@Only-api
@Post
@Get
@Delete
@Observation
Feature: Blood before and after tranplant resource actions
Description: This feature checks the patient resource actions, get, post and delete made on FHIR specific Observation node. This resource is part of the Stem Cell Transplantation.
File name: xaw.feature
Relative path: api/xaw.feature
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:00:46.461 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:48.147 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:48.147 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"imx65GL4tESJCGSv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16863/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:00:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:00:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:48.147 [print] {
"resourceType": "Observation",
"id": "16863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:00:52.931+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:00:48.147 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:48.147 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:48.147 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"imx65GL4tESJCGSv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16863/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:00:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16863/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:00:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:48.147 [print] {
"resourceType": "Observation",
"id": "16863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:00:52.931+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:00:48.147 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:00:48.835 [print] {
"resourceType": "Observation",
"id": "16863",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:00:52.931+02:00",
"source": "#imx65GL4tESJCGSv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:00:49.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:00:50.088 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:00:54.280+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:00:54.280+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:00:50.088 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:50.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:50.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2wJtrcrUIG5XNNvb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16864/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:00:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:00:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:50.741 [print] {
"resourceType": "Observation",
"id": "16864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:00:55.534+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:00:50.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:50.742 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:50.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2wJtrcrUIG5XNNvb"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16864/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:00:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16864/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:00:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:50.742 [print] {
"resourceType": "Observation",
"id": "16864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:00:55.534+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:00:50.742 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:00:51.826 [print] {
"resourceType": "Observation",
"id": "16864",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:00:55.534+02:00",
"source": "#2wJtrcrUIG5XNNvb",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:00:53.440 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:00:55.026 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:00:58.231+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:00:58.231+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:00:55.026 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:55.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:55.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tsEz4S5kWKAzlfO2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16865/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:00:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:55.691 [print] {
"resourceType": "Observation",
"id": "16865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:00.455+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:00:55.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:55.691 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:55.691 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tsEz4S5kWKAzlfO2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16865/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16865/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:00:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:55.691 [print] {
"resourceType": "Observation",
"id": "16865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:00.455+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:00:55.691 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:00:56.348 [print] {
"resourceType": "Observation",
"id": "16865",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:00.455+02:00",
"source": "#tsEz4S5kWKAzlfO2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:00:56.986 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:00:57.607 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:01.783+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:01.783+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:00:57.607 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:58.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:58.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DV6RrUe4ju8Gkb97"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16866/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:58.415 [print] {
"resourceType": "Observation",
"id": "16866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:03.214+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:00:58.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:00:58.416 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:00:58.416 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DV6RrUe4ju8Gkb97"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16866/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16866/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:00:58.416 [print] {
"resourceType": "Observation",
"id": "16866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:03.214+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:00:58.416 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:00:59.158 [print] {
"resourceType": "Observation",
"id": "16866",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:03.214+02:00",
"source": "#DV6RrUe4ju8Gkb97",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:00:59.787 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:00.676 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:04.577+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:04.577+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:00.676 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:01.298 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:01.298 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V9QIziGShKWujwtm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16867/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:01.298 [print] {
"resourceType": "Observation",
"id": "16867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:06.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:01.298 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:01.299 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:01.300 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"V9QIziGShKWujwtm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16867/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16867/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:01.300 [print] {
"resourceType": "Observation",
"id": "16867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:06.073+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:01.300 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:01.923 [print] {
"resourceType": "Observation",
"id": "16867",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:06.073+02:00",
"source": "#V9QIziGShKWujwtm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:02.524 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 17ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 17ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:03.131 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:07.329+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:07.329+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:03.131 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:04.107 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:04.107 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f8OufKahC3kaqzSS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16868/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:04.107 [print] {
"resourceType": "Observation",
"id": "16868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:08.870+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:04.107 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:04.123 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:04.123 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"f8OufKahC3kaqzSS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16868/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16868/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:04.123 [print] {
"resourceType": "Observation",
"id": "16868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:08.870+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:04.123 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:04.742 [print] {
"resourceType": "Observation",
"id": "16868",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:08.870+02:00",
"source": "#f8OufKahC3kaqzSS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:05.358 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:05.987 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:10.161+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:10.161+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:05.987 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:06.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:06.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fGhPH6dBRC4G3lGs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16869/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:06.701 [print] {
"resourceType": "Observation",
"id": "16869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:11.479+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:06.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:06.701 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:06.701 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fGhPH6dBRC4G3lGs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16869/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16869/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:06.701 [print] {
"resourceType": "Observation",
"id": "16869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:11.479+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:06.701 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:07.275 [print] {
"resourceType": "Observation",
"id": "16869",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:11.479+02:00",
"source": "#fGhPH6dBRC4G3lGs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:07.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:08.504 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:12.681+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:12.681+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:08.505 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:09.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:09.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kQTJEgBOzHPSWNxv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16870/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:09.156 [print] {
"resourceType": "Observation",
"id": "16870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:13.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:09.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:09.156 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:09.156 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kQTJEgBOzHPSWNxv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16870/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16870/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:09.156 [print] {
"resourceType": "Observation",
"id": "16870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:13.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:09.156 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:09.772 [print] {
"resourceType": "Observation",
"id": "16870",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:13.938+02:00",
"source": "#kQTJEgBOzHPSWNxv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:10.366 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:11.071 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:15.159+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:15.159+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:11.072 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:11.705 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:11.705 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EplAye7olDuA2fx0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16871/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:11.705 [print] {
"resourceType": "Observation",
"id": "16871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:16.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:11.705 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:11.705 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:11.705 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EplAye7olDuA2fx0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16871/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16871/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:11.705 [print] {
"resourceType": "Observation",
"id": "16871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:16.496+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:11.705 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:12.273 [print] {
"resourceType": "Observation",
"id": "16871",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:16.496+02:00",
"source": "#EplAye7olDuA2fx0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:14.125 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:15.781 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:18.924+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:18.924+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:15.782 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:16.380 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:16.380 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3CB08pfLME34mbfK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16872/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:16.380 [print] {
"resourceType": "Observation",
"id": "16872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:21.178+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:16.380 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:16.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:16.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3CB08pfLME34mbfK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16872/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16872/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:16.382 [print] {
"resourceType": "Observation",
"id": "16872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:21.178+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:16.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:17.004 [print] {
"resourceType": "Observation",
"id": "16872",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:21.178+02:00",
"source": "#3CB08pfLME34mbfK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:17.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:18.254 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:22.434+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:22.434+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:18.256 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:18.857 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:18.857 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CoPf0zakdeePUZUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16873/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:18.857 [print] {
"resourceType": "Observation",
"id": "16873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:23.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:18.857 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:18.857 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:18.857 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CoPf0zakdeePUZUR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16873/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16873/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:18.857 [print] {
"resourceType": "Observation",
"id": "16873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:23.640+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:18.857 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:19.488 [print] {
"resourceType": "Observation",
"id": "16873",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:23.640+02:00",
"source": "#CoPf0zakdeePUZUR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:20.128 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:20.707 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:24.928+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:24.928+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:20.714 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:21.356 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:21.356 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TPbQk4eCmc7PSpOV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16874/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:21.356 [print] {
"resourceType": "Observation",
"id": "16874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:26.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:21.356 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:21.356 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:21.356 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TPbQk4eCmc7PSpOV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16874/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16874/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:21.356 [print] {
"resourceType": "Observation",
"id": "16874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:26.142+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:21.356 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:21.978 [print] {
"resourceType": "Observation",
"id": "16874",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:26.142+02:00",
"source": "#TPbQk4eCmc7PSpOV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:22.591 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:23.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:27.397+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:27.397+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:23.174 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:23.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:23.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YdK2DMktRstbjygc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16875/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:23.803 [print] {
"resourceType": "Observation",
"id": "16875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:28.583+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:23.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:23.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:23.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YdK2DMktRstbjygc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16875/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16875/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:23.803 [print] {
"resourceType": "Observation",
"id": "16875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:28.583+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:23.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:24.387 [print] {
"resourceType": "Observation",
"id": "16875",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:28.583+02:00",
"source": "#YdK2DMktRstbjygc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:25.040 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:25.657 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:29.842+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:29.842+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:25.657 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:26.271 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:26.271 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Vex0L1Qop1jvQ6qE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16876/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:26.271 [print] {
"resourceType": "Observation",
"id": "16876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:31.061+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:26.271 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:26.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:26.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Vex0L1Qop1jvQ6qE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16876/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16876/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:26.273 [print] {
"resourceType": "Observation",
"id": "16876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:31.061+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:26.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:26.841 [print] {
"resourceType": "Observation",
"id": "16876",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:31.061+02:00",
"source": "#Vex0L1Qop1jvQ6qE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:27.668 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:28.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:32.469+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:32.469+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:28.268 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:28.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:28.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q0LYb7Gu4Uq8LWtg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16877/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:28.880 [print] {
"resourceType": "Observation",
"id": "16877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:33.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:28.880 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:28.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:28.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Q0LYb7Gu4Uq8LWtg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16877/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16877/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:28.880 [print] {
"resourceType": "Observation",
"id": "16877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:33.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:01:28.880 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:29.556 [print] {
"resourceType": "Observation",
"id": "16877",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:33.661+02:00",
"source": "#Q0LYb7Gu4Uq8LWtg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:30.237 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 23ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 23ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:31.203 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:35.027+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:35.027+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:31.203 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:31.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:31.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lyRHgf3fWmll1Izq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16878/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:31.839 [print] {
"resourceType": "Observation",
"id": "16878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:36.638+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:31.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:31.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:31.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lyRHgf3fWmll1Izq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16878/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16878/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:31.839 [print] {
"resourceType": "Observation",
"id": "16878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:36.638+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:31.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:32.607 [print] {
"resourceType": "Observation",
"id": "16878",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:36.638+02:00",
"source": "#lyRHgf3fWmll1Izq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:33.220 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:34.846 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:38.005+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:38.005+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:34.846 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:35.468 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:35.468 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CxY9ETJeCzFbirZE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16879/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:35.468 [print] {
"resourceType": "Observation",
"id": "16879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:40.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:35.468 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:35.468 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:35.468 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"CxY9ETJeCzFbirZE"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16879/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16879/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:35.468 [print] {
"resourceType": "Observation",
"id": "16879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:40.249+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:35.468 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:36.106 [print] {
"resourceType": "Observation",
"id": "16879",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:40.249+02:00",
"source": "#CxY9ETJeCzFbirZE",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:36.723 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:37.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:41.533+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:41.533+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:37.308 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:38.277 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:38.277 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QOiyET2bwMtRmTCi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16880/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:38.277 [print] {
"resourceType": "Observation",
"id": "16880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:43.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:38.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:38.277 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:38.277 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QOiyET2bwMtRmTCi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16880/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16880/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:38.277 [print] {
"resourceType": "Observation",
"id": "16880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:43.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:38.277 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:38.864 [print] {
"resourceType": "Observation",
"id": "16880",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:43.066+02:00",
"source": "#QOiyET2bwMtRmTCi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:39.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:40.561 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:44.724+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:44.724+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:40.562 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:41.186 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:41.201 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JOlOzBKJNRp84R06"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16881/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:41.201 [print] {
"resourceType": "Observation",
"id": "16881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:45.966+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:41.201 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:41.201 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:41.201 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JOlOzBKJNRp84R06"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16881/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16881/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:41.201 [print] {
"resourceType": "Observation",
"id": "16881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:45.966+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:41.201 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:42.025 [print] {
"resourceType": "Observation",
"id": "16881",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:45.966+02:00",
"source": "#JOlOzBKJNRp84R06",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:42.710 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:43.350 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:47.470+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:47.470+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:43.350 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:44.151 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:44.151 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0Nyyt7hlfFsfSKA4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16882/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:44.151 [print] {
"resourceType": "Observation",
"id": "16882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:48.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:44.151 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:44.157 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:44.157 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0Nyyt7hlfFsfSKA4"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16882/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16882/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:44.157 [print] {
"resourceType": "Observation",
"id": "16882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:48.960+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:44.157 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:45.251 [print] {
"resourceType": "Observation",
"id": "16882",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:48.960+02:00",
"source": "#0Nyyt7hlfFsfSKA4",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:45.839 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:46.477 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:50.651+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:50.651+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:46.477 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:47.486 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:47.487 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iSozWCyN0HIDxXZB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16883/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:47.487 [print] {
"resourceType": "Observation",
"id": "16883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:52.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:47.487 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:47.488 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:47.488 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"iSozWCyN0HIDxXZB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16883/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16883/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:47.488 [print] {
"resourceType": "Observation",
"id": "16883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:52.269+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:47.488 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:49.076 [print] {
"resourceType": "Observation",
"id": "16883",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:52.269+02:00",
"source": "#iSozWCyN0HIDxXZB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:50.129 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:50.708 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:54.928+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:54.928+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:50.708 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:51.337 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:51.339 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8IzK93XZUjdT8pK0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16884/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:51.339 [print] {
"resourceType": "Observation",
"id": "16884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:56.125+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:51.339 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:51.339 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:51.339 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8IzK93XZUjdT8pK0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16884/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16884/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:51.339 [print] {
"resourceType": "Observation",
"id": "16884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:56.125+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:51.339 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:51.966 [print] {
"resourceType": "Observation",
"id": "16884",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:56.125+02:00",
"source": "#8IzK93XZUjdT8pK0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:52.561 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:53.122 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:57.354+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:57.354+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:53.122 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:53.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:53.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kpN5nNyPF0PyMPAI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16885/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:53.766 [print] {
"resourceType": "Observation",
"id": "16885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:58.566+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:53.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:53.768 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:53.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"kpN5nNyPF0PyMPAI"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16885/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:01:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16885/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:01:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:53.768 [print] {
"resourceType": "Observation",
"id": "16885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:58.566+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:01:53.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:54.393 [print] {
"resourceType": "Observation",
"id": "16885",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:01:58.566+02:00",
"source": "#kpN5nNyPF0PyMPAI",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:55.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:55.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:01:59.827+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:01:59.827+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:55.623 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:56.259 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:56.259 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jReyePXUDxhBc9AR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16886/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:56.259 [print] {
"resourceType": "Observation",
"id": "16886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:01.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:56.260 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:01:56.261 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:01:56.261 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jReyePXUDxhBc9AR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16886/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16886/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:01:56.261 [print] {
"resourceType": "Observation",
"id": "16886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:01.035+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:01:56.261 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:01:56.868 [print] {
"resourceType": "Observation",
"id": "16886",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:01.035+02:00",
"source": "#jReyePXUDxhBc9AR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:01:57.525 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:01:58.133 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:02.330+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:02.330+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:01:58.133 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:00.184 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:00.184 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UGEvKOwDWZI3zWzR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16887/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:00.184 [print] {
"resourceType": "Observation",
"id": "16887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:04.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:00.184 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:00.186 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:00.186 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UGEvKOwDWZI3zWzR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16887/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16887/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:00.186 [print] {
"resourceType": "Observation",
"id": "16887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:04.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:00.186 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:01.261 [print] {
"resourceType": "Observation",
"id": "16887",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:04.984+02:00",
"source": "#UGEvKOwDWZI3zWzR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:01.875 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:02.451 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:06.678+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:06.678+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:02.452 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:03.092 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:03.092 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BI83Vu753YeI7Ii9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16888/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:03.092 [print] {
"resourceType": "Observation",
"id": "16888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:07.892+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:03.092 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:03.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:03.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BI83Vu753YeI7Ii9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16888/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16888/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:03.093 [print] {
"resourceType": "Observation",
"id": "16888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:07.892+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:03.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:03.713 [print] {
"resourceType": "Observation",
"id": "16888",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:07.892+02:00",
"source": "#BI83Vu753YeI7Ii9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:04.319 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:04.922 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:09.134+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:09.134+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:04.923 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:05.525 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:05.525 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4fb9TPFXVeW6YKE2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16889/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:05.525 [print] {
"resourceType": "Observation",
"id": "16889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:10.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:05.525 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:05.525 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:05.525 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4fb9TPFXVeW6YKE2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16889/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16889/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:05.525 [print] {
"resourceType": "Observation",
"id": "16889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:10.319+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:05.525 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:06.102 [print] {
"resourceType": "Observation",
"id": "16889",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:10.319+02:00",
"source": "#4fb9TPFXVeW6YKE2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:06.740 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:07.338 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:11.536+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:11.536+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:07.338 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:08.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:08.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZXfoebqsk71DTaMg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16890/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:08.002 [print] {
"resourceType": "Observation",
"id": "16890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:12.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:08.002 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:08.002 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:08.002 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZXfoebqsk71DTaMg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16890/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16890/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:08.002 [print] {
"resourceType": "Observation",
"id": "16890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:12.809+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:08.002 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:08.604 [print] {
"resourceType": "Observation",
"id": "16890",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:12.809+02:00",
"source": "#ZXfoebqsk71DTaMg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:09.237 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:10.143 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:14.053+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:14.053+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:10.144 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:10.801 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:10.801 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ql1hzJWe4JBEHyJm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16891/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:10.802 [print] {
"resourceType": "Observation",
"id": "16891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:15.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:10.802 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:10.804 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:10.804 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ql1hzJWe4JBEHyJm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16891/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16891/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:10.804 [print] {
"resourceType": "Observation",
"id": "16891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:15.596+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:10.804 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:11.401 [print] {
"resourceType": "Observation",
"id": "16891",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:15.596+02:00",
"source": "#ql1hzJWe4JBEHyJm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:12.050 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:12.674 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:16.856+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:16.856+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:12.674 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:13.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:13.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qhNW5wx09vSxX5zs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16892/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:13.286 [print] {
"resourceType": "Observation",
"id": "16892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:18.094+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:13.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:13.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:13.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qhNW5wx09vSxX5zs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16892/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16892/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:13.286 [print] {
"resourceType": "Observation",
"id": "16892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:18.094+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:13.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:14.132 [print] {
"resourceType": "Observation",
"id": "16892",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:18.094+02:00",
"source": "#qhNW5wx09vSxX5zs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:14.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:15.314 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:19.551+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:19.551+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:15.314 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:15.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:15.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MaEOmHQuFKJm4UkX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16893/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:15.932 [print] {
"resourceType": "Observation",
"id": "16893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:20.736+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:15.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:15.932 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:15.932 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"MaEOmHQuFKJm4UkX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16893/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16893/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:15.932 [print] {
"resourceType": "Observation",
"id": "16893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:20.736+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:15.932 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:16.632 [print] {
"resourceType": "Observation",
"id": "16893",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:20.736+02:00",
"source": "#MaEOmHQuFKJm4UkX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:17.304 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:17.937 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:22.081+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:22.081+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:17.937 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:18.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:18.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"edP2zasBKHLOIml0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16894/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:18.654 [print] {
"resourceType": "Observation",
"id": "16894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:23.448+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:18.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:18.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:18.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"edP2zasBKHLOIml0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16894/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16894/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:18.654 [print] {
"resourceType": "Observation",
"id": "16894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:23.448+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:18.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:19.268 [print] {
"resourceType": "Observation",
"id": "16894",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:23.448+02:00",
"source": "#edP2zasBKHLOIml0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:19.866 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:20.480 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:24.682+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:24.682+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:20.480 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:21.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:21.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sPXFkqDJR4z0jVh1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16895/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:21.078 [print] {
"resourceType": "Observation",
"id": "16895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:25.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:21.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:21.078 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:21.078 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sPXFkqDJR4z0jVh1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16895/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16895/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:21.078 [print] {
"resourceType": "Observation",
"id": "16895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:25.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:21.078 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:21.695 [print] {
"resourceType": "Observation",
"id": "16895",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:25.879+02:00",
"source": "#sPXFkqDJR4z0jVh1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:22.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:22.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:27.096+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:27.096+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:22.951 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:23.632 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:23.632 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RAzOFYT8rQSjdrj6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16896/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:23.632 [print] {
"resourceType": "Observation",
"id": "16896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:28.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:23.632 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:23.632 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:23.632 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RAzOFYT8rQSjdrj6"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16896/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16896/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:23.632 [print] {
"resourceType": "Observation",
"id": "16896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:28.435+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:23.632 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:24.266 [print] {
"resourceType": "Observation",
"id": "16896",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:28.435+02:00",
"source": "#RAzOFYT8rQSjdrj6",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:24.930 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:25.537 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:29.745+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:29.745+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:25.537 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:26.175 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:26.175 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EFjyjYDGDjw8Kriz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16897/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:26.175 [print] {
"resourceType": "Observation",
"id": "16897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:30.968+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:26.175 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:26.176 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:26.176 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"EFjyjYDGDjw8Kriz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16897/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16897/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:26.176 [print] {
"resourceType": "Observation",
"id": "16897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:30.968+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:26.176 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:26.782 [print] {
"resourceType": "Observation",
"id": "16897",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:30.968+02:00",
"source": "#EFjyjYDGDjw8Kriz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:27.647 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:28.255 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:32.463+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:32.463+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:28.256 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:28.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:28.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1sFWRnOyu50uhlwT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16898/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:28.867 [print] {
"resourceType": "Observation",
"id": "16898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:33.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:28.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:28.884 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:28.884 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1sFWRnOyu50uhlwT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16898/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16898/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:28.884 [print] {
"resourceType": "Observation",
"id": "16898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:33.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:28.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:30.484 [print] {
"resourceType": "Observation",
"id": "16898",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:33.690+02:00",
"source": "#1sFWRnOyu50uhlwT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:31.117 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:31.736 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:35.940+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:35.940+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:31.737 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:32.365 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:32.365 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KwPZke3xxIhEDeZC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16899/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:32.365 [print] {
"resourceType": "Observation",
"id": "16899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:37.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:32.365 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:32.365 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:32.365 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KwPZke3xxIhEDeZC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16899/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16899/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:32.365 [print] {
"resourceType": "Observation",
"id": "16899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:37.170+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:32.365 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:32.989 [print] {
"resourceType": "Observation",
"id": "16899",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:37.170+02:00",
"source": "#KwPZke3xxIhEDeZC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:33.584 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:34.241 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:38.399+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:38.399+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:34.242 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:34.908 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:34.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yuPAvNMN8q699qOo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16900/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:34.908 [print] {
"resourceType": "Observation",
"id": "16900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:39.676+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:34.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:34.908 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:34.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yuPAvNMN8q699qOo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16900/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16900/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:34.908 [print] {
"resourceType": "Observation",
"id": "16900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:39.676+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:34.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:35.551 [print] {
"resourceType": "Observation",
"id": "16900",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:39.676+02:00",
"source": "#yuPAvNMN8q699qOo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:36.152 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:36.783 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:40.976+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:40.976+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:36.783 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:37.403 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:37.403 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qrDKz1dHXImjlMw3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16901/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:37.403 [print] {
"resourceType": "Observation",
"id": "16901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:42.219+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:37.403 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:37.418 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:37.418 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qrDKz1dHXImjlMw3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16901/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16901/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:37.418 [print] {
"resourceType": "Observation",
"id": "16901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:42.219+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:02:37.418 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:38.415 [print] {
"resourceType": "Observation",
"id": "16901",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:42.219+02:00",
"source": "#qrDKz1dHXImjlMw3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:39.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:39.729 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:43.894+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:43.894+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:39.730 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:40.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:40.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZTRlCaEgNW2kmCG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16902/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:40.415 [print] {
"resourceType": "Observation",
"id": "16902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:45.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:40.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:40.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:40.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"aZTRlCaEgNW2kmCG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16902/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16902/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:40.415 [print] {
"resourceType": "Observation",
"id": "16902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:45.224+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:40.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:41.003 [print] {
"resourceType": "Observation",
"id": "16902",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:45.224+02:00",
"source": "#aZTRlCaEgNW2kmCG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:41.781 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:42.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:46.602+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:46.602+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:42.452 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:43.247 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:43.247 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lkA5CBYBndYS11Zt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16903/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:43.248 [print] {
"resourceType": "Observation",
"id": "16903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:48.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:43.248 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:43.249 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:43.249 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lkA5CBYBndYS11Zt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16903/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16903/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:43.249 [print] {
"resourceType": "Observation",
"id": "16903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:48.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:43.249 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:43.869 [print] {
"resourceType": "Observation",
"id": "16903",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:48.051+02:00",
"source": "#lkA5CBYBndYS11Zt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:44.493 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:45.079 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:49.311+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:49.311+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:45.079 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:45.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:45.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gbsSNOTAfNPwixgl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16904/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:45.688 [print] {
"resourceType": "Observation",
"id": "16904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:50.485+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:45.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:45.688 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:45.688 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gbsSNOTAfNPwixgl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16904/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16904/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:45.688 [print] {
"resourceType": "Observation",
"id": "16904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:50.485+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:45.688 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:46.293 [print] {
"resourceType": "Observation",
"id": "16904",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:50.485+02:00",
"source": "#gbsSNOTAfNPwixgl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:47.129 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:47.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:51.742+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:51.742+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:47.749 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:48.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:48.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bg3EEL9N6aHWp3Ma"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16905/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:48.383 [print] {
"resourceType": "Observation",
"id": "16905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:53.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:48.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:48.383 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:48.383 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bg3EEL9N6aHWp3Ma"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16905/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16905/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:48.383 [print] {
"resourceType": "Observation",
"id": "16905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:53.189+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:48.383 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:48.998 [print] {
"resourceType": "Observation",
"id": "16905",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:53.189+02:00",
"source": "#bg3EEL9N6aHWp3Ma",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:49.653 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:51.306 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:54.463+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:54.463+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:51.307 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:51.988 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:51.988 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jalj2RFJ0qDEkRRT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16906/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:51.988 [print] {
"resourceType": "Observation",
"id": "16906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:56.772+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:51.988 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:51.989 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:51.989 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jalj2RFJ0qDEkRRT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16906/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16906/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:51.990 [print] {
"resourceType": "Observation",
"id": "16906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:56.772+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:51.990 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:52.591 [print] {
"resourceType": "Observation",
"id": "16906",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:56.772+02:00",
"source": "#jalj2RFJ0qDEkRRT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:53.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 11ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 11ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:53.746 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:02:57.991+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:02:57.991+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:53.746 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:54.733 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:54.733 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIVosruxX9crIfRy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16907/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:54.733 [print] {
"resourceType": "Observation",
"id": "16907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:59.543+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:54.733 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:54.733 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:54.733 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lIVosruxX9crIfRy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16907/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:02:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16907/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:02:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:54.733 [print] {
"resourceType": "Observation",
"id": "16907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:59.543+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:02:54.733 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:55.303 [print] {
"resourceType": "Observation",
"id": "16907",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:02:59.543+02:00",
"source": "#lIVosruxX9crIfRy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:56.370 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:02:57.504 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:01.179+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:01.179+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:02:57.504 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:58.615 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:58.615 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qgfc9id6afTbySOA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16908/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:58.615 [print] {
"resourceType": "Observation",
"id": "16908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:03.427+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:58.615 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:02:58.621 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:02:58.621 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qgfc9id6afTbySOA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16908/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16908/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:02:58.621 [print] {
"resourceType": "Observation",
"id": "16908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:03.427+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:02:58.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:02:59.239 [print] {
"resourceType": "Observation",
"id": "16908",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:03.427+02:00",
"source": "#qgfc9id6afTbySOA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:02:59.919 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:00.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:04.716+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:04.716+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:00.709 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:01.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:01.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hf7BMo3Q3v8ypqry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16909/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:01.346 [print] {
"resourceType": "Observation",
"id": "16909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:06.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:01.346 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:01.346 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:01.346 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hf7BMo3Q3v8ypqry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16909/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16909/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:01.362 [print] {
"resourceType": "Observation",
"id": "16909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:06.153+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:01.362 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:02.131 [print] {
"resourceType": "Observation",
"id": "16909",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:06.153+02:00",
"source": "#hf7BMo3Q3v8ypqry",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:02.782 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:03.411 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:07.588+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:07.588+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:03.412 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:04.030 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:04.030 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KFCahORPqRfBPkb5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16910/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:04.030 [print] {
"resourceType": "Observation",
"id": "16910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:08.839+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:04.030 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:04.030 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:04.030 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KFCahORPqRfBPkb5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16910/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16910/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:04.030 [print] {
"resourceType": "Observation",
"id": "16910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:08.839+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:04.030 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:04.624 [print] {
"resourceType": "Observation",
"id": "16910",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:08.839+02:00",
"source": "#KFCahORPqRfBPkb5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:05.256 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:05.879 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:10.074+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:10.074+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:05.879 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:06.512 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:06.512 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UlEZI22GWVPQv9Aa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16911/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:06.512 [print] {
"resourceType": "Observation",
"id": "16911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:11.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:06.512 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:06.513 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:06.513 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UlEZI22GWVPQv9Aa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16911/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16911/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:06.513 [print] {
"resourceType": "Observation",
"id": "16911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:11.300+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:06.513 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:08.528 [print] {
"resourceType": "Observation",
"id": "16911",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:11.300+02:00",
"source": "#UlEZI22GWVPQv9Aa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:09.144 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:09.760 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:13.966+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:13.966+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:09.760 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:10.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:10.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XF2AjXr9YcyNiDPp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16912/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:10.414 [print] {
"resourceType": "Observation",
"id": "16912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:15.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:10.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:10.414 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:10.414 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XF2AjXr9YcyNiDPp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16912/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16912/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:10.414 [print] {
"resourceType": "Observation",
"id": "16912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:15.200+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:10.414 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:10.980 [print] {
"resourceType": "Observation",
"id": "16912",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:15.200+02:00",
"source": "#XF2AjXr9YcyNiDPp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:12.771 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:13.429 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:17.594+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:17.594+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:13.429 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:14.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:14.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m9qDn9j9FaeqToMC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16913/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:14.290 [print] {
"resourceType": "Observation",
"id": "16913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:19.070+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:14.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:14.290 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:14.290 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"m9qDn9j9FaeqToMC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16913/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16913/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:14.290 [print] {
"resourceType": "Observation",
"id": "16913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:19.070+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:14.290 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:14.909 [print] {
"resourceType": "Observation",
"id": "16913",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:19.070+02:00",
"source": "#m9qDn9j9FaeqToMC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:15.593 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:16.527 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:20.389+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:20.389+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:16.527 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:17.167 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:17.167 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7OFp01YSUsQaFlFj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16914/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:17.167 [print] {
"resourceType": "Observation",
"id": "16914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:21.986+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:17.167 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:17.183 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:17.183 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7OFp01YSUsQaFlFj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16914/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16914/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:17.183 [print] {
"resourceType": "Observation",
"id": "16914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:21.986+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:17.183 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:17.803 [print] {
"resourceType": "Observation",
"id": "16914",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:21.986+02:00",
"source": "#7OFp01YSUsQaFlFj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:18.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 10ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 10ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:19.275 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:23.231+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:23.231+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:19.291 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:19.904 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:19.904 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FA5uWXWJcD6wA4me"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16915/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:19.904 [print] {
"resourceType": "Observation",
"id": "16915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:24.709+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:19.904 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:19.905 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:19.905 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FA5uWXWJcD6wA4me"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16915/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16915/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:19.905 [print] {
"resourceType": "Observation",
"id": "16915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:24.709+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:19.905 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:20.535 [print] {
"resourceType": "Observation",
"id": "16915",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:24.709+02:00",
"source": "#FA5uWXWJcD6wA4me",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:21.132 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:21.725 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:25.942+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:25.942+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:21.725 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:22.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:22.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RMBE5n2B1Ig603I2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16916/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:22.641 [print] {
"resourceType": "Observation",
"id": "16916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:27.446+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:22.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:22.641 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:22.641 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RMBE5n2B1Ig603I2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16916/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16916/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:22.641 [print] {
"resourceType": "Observation",
"id": "16916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:27.446+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:22.641 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:23.428 [print] {
"resourceType": "Observation",
"id": "16916",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:27.446+02:00",
"source": "#RMBE5n2B1Ig603I2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:24.027 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:24.725 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:28.842+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:28.842+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:24.725 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:25.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:25.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h9WBuEyYlyfRRd4w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16917/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:25.548 [print] {
"resourceType": "Observation",
"id": "16917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:30.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:25.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:25.563 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:25.563 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"h9WBuEyYlyfRRd4w"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16917/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16917/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:25.563 [print] {
"resourceType": "Observation",
"id": "16917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:30.369+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:25.563 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:26.171 [print] {
"resourceType": "Observation",
"id": "16917",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:30.369+02:00",
"source": "#h9WBuEyYlyfRRd4w",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:26.796 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:27.397 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:31.612+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:31.612+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:27.397 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:27.999 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:27.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1qoqlzGhEyBB8ZYV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16918/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:27.999 [print] {
"resourceType": "Observation",
"id": "16918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:32.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:27.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:27.999 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:27.999 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1qoqlzGhEyBB8ZYV"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16918/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16918/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:27.999 [print] {
"resourceType": "Observation",
"id": "16918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:32.819+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:27.999 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:28.849 [print] {
"resourceType": "Observation",
"id": "16918",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:32.819+02:00",
"source": "#1qoqlzGhEyBB8ZYV",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:29.511 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:30.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:34.333+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:34.333+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:30.083 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:30.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:30.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YPFUEp0KgKA3FdWa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16919/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:30.741 [print] {
"resourceType": "Observation",
"id": "16919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:35.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:30.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:30.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:30.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YPFUEp0KgKA3FdWa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16919/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16919/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:30.741 [print] {
"resourceType": "Observation",
"id": "16919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:35.549+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:30.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:31.359 [print] {
"resourceType": "Observation",
"id": "16919",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:35.549+02:00",
"source": "#YPFUEp0KgKA3FdWa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:32.237 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:32.844 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:37.056+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:37.056+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:32.860 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:33.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:33.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SiT2dWbhQ8C9NG8J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16920/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:33.493 [print] {
"resourceType": "Observation",
"id": "16920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:38.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:33.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:33.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:33.493 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"SiT2dWbhQ8C9NG8J"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16920/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16920/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:33.493 [print] {
"resourceType": "Observation",
"id": "16920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:38.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:33.493 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:34.061 [print] {
"resourceType": "Observation",
"id": "16920",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:38.302+02:00",
"source": "#SiT2dWbhQ8C9NG8J",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:34.709 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:35.318 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:39.521+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:39.521+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:35.319 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:35.951 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:35.951 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"soISwdrxjVdlYaU2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16921/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:35.951 [print] {
"resourceType": "Observation",
"id": "16921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:40.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:35.951 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:35.953 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:35.953 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"soISwdrxjVdlYaU2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16921/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16921/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:35.953 [print] {
"resourceType": "Observation",
"id": "16921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:40.746+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:35.953 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:36.552 [print] {
"resourceType": "Observation",
"id": "16921",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:40.746+02:00",
"source": "#soISwdrxjVdlYaU2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:37.194 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:37.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:42.012+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:42.012+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:37.795 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:38.435 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:38.435 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cM58OmzcQ19yk5RX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16922/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:38.435 [print] {
"resourceType": "Observation",
"id": "16922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:43.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:38.435 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:38.437 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:38.437 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"cM58OmzcQ19yk5RX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16922/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:43 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16922/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:43 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:38.437 [print] {
"resourceType": "Observation",
"id": "16922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:43.234+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:38.437 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:39.058 [print] {
"resourceType": "Observation",
"id": "16922",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:43.234+02:00",
"source": "#cM58OmzcQ19yk5RX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:40.873 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:42.468 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:45.677+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:45.677+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:42.469 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:43.083 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:43.083 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bbfDJnFSwmaCwjbU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16923/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:43.083 [print] {
"resourceType": "Observation",
"id": "16923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:47.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:43.083 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:43.098 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:43.098 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"bbfDJnFSwmaCwjbU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16923/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16923/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:43.098 [print] {
"resourceType": "Observation",
"id": "16923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:47.879+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:43.098 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:43.712 [print] {
"resourceType": "Observation",
"id": "16923",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:47.879+02:00",
"source": "#bbfDJnFSwmaCwjbU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:44.656 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:45.258 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:49.446+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:49.446+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:45.259 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:45.859 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:45.859 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JCbZzZt30TSRKvWW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16924/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:45.859 [print] {
"resourceType": "Observation",
"id": "16924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:50.669+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:45.859 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:45.861 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:45.861 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JCbZzZt30TSRKvWW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16924/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16924/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:45.861 [print] {
"resourceType": "Observation",
"id": "16924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:50.669+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:45.861 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:46.445 [print] {
"resourceType": "Observation",
"id": "16924",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:50.669+02:00",
"source": "#JCbZzZt30TSRKvWW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:47.056 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:47.646 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:51.875+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:51.875+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:47.646 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:48.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:48.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BqCneRtoq2hINilp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16925/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:48.255 [print] {
"resourceType": "Observation",
"id": "16925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:53.063+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:48.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:48.255 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:48.255 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BqCneRtoq2hINilp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16925/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16925/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:48.255 [print] {
"resourceType": "Observation",
"id": "16925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:53.063+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:03:48.255 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:48.872 [print] {
"resourceType": "Observation",
"id": "16925",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:53.063+02:00",
"source": "#BqCneRtoq2hINilp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:50.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:51.414 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:55.284+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:55.284+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:51.414 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:52.035 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:52.035 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8d5bKoPx1GqDKMCC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16926/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:52.035 [print] {
"resourceType": "Observation",
"id": "16926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:56.858+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:52.035 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:52.035 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:52.035 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8d5bKoPx1GqDKMCC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16926/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16926/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:52.035 [print] {
"resourceType": "Observation",
"id": "16926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:56.858+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:52.035 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:52.857 [print] {
"resourceType": "Observation",
"id": "16926",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:56.858+02:00",
"source": "#8d5bKoPx1GqDKMCC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:53.598 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:54.285 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:03:58.301+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:03:58.301+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:54.285 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:54.922 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:54.922 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j7pZe4EoXA7qwlrK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16927/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:54.922 [print] {
"resourceType": "Observation",
"id": "16927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:59.718+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:54.922 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:54.922 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:54.922 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"j7pZe4EoXA7qwlrK"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16927/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:03:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16927/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:03:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:54.922 [print] {
"resourceType": "Observation",
"id": "16927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:59.718+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:03:54.922 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:55.556 [print] {
"resourceType": "Observation",
"id": "16927",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:03:59.718+02:00",
"source": "#j7pZe4EoXA7qwlrK",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:03:56.507 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:03:57.113 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:01.326+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:01.326+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:03:57.113 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:58.920 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:58.920 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jzQHJ9IgXCzbe4Ax"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16928/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:58.920 [print] {
"resourceType": "Observation",
"id": "16928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:03.750+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:58.920 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:03:58.937 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:03:58.937 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jzQHJ9IgXCzbe4Ax"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16928/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16928/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:03:58.937 [print] {
"resourceType": "Observation",
"id": "16928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:03.750+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:03:58.937 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:03:59.555 [print] {
"resourceType": "Observation",
"id": "16928",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:03.750+02:00",
"source": "#jzQHJ9IgXCzbe4Ax",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:00.240 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:00.807 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:05.050+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:05.050+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:00.823 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:01.638 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:01.638 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TXs1qiv34hvdJww9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16929/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:01.638 [print] {
"resourceType": "Observation",
"id": "16929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:06.451+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:01.638 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:01.638 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:01.638 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TXs1qiv34hvdJww9"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16929/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16929/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:01.638 [print] {
"resourceType": "Observation",
"id": "16929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:06.451+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:01.638 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:02.397 [print] {
"resourceType": "Observation",
"id": "16929",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:06.451+02:00",
"source": "#TXs1qiv34hvdJww9",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:03.389 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:03.950 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:08.206+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:08.206+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:03.950 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:04.645 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:04.645 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lgAuCAxLsV3FCWfm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16930/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:04.645 [print] {
"resourceType": "Observation",
"id": "16930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:09.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:04.645 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:04.645 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:04.645 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lgAuCAxLsV3FCWfm"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16930/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16930/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:04.645 [print] {
"resourceType": "Observation",
"id": "16930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:09.456+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:04.645 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:06.264 [print] {
"resourceType": "Observation",
"id": "16930",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:09.456+02:00",
"source": "#lgAuCAxLsV3FCWfm",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:06.874 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:07.458 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:11.679+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:11.679+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:07.458 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:08.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:08.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QKokgZgnyfkNhtip"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16931/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:08.286 [print] {
"resourceType": "Observation",
"id": "16931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:13.102+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:08.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:08.286 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:08.286 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"QKokgZgnyfkNhtip"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16931/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16931/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:08.286 [print] {
"resourceType": "Observation",
"id": "16931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:13.102+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:08.286 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:08.906 [print] {
"resourceType": "Observation",
"id": "16931",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:13.102+02:00",
"source": "#QKokgZgnyfkNhtip",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:09.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:10.171 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:14.354+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:14.354+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:10.171 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:10.766 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:10.766 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PeRRhl1wrL0do3y0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16932/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:10.766 [print] {
"resourceType": "Observation",
"id": "16932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:15.585+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:10.766 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:10.768 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:10.768 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"PeRRhl1wrL0do3y0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16932/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16932/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:10.768 [print] {
"resourceType": "Observation",
"id": "16932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:15.585+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:10.768 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:11.324 [print] {
"resourceType": "Observation",
"id": "16932",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:15.585+02:00",
"source": "#PeRRhl1wrL0do3y0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:11.923 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:12.891 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:16.754+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:16.754+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:12.893 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:13.876 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:13.877 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5oG0P6GHpN4WP25D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16933/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:13.877 [print] {
"resourceType": "Observation",
"id": "16933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:18.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:13.877 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:13.878 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:13.878 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5oG0P6GHpN4WP25D"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16933/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:18 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16933/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:13.878 [print] {
"resourceType": "Observation",
"id": "16933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:18.670+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:13.878 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:14.481 [print] {
"resourceType": "Observation",
"id": "16933",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:18.670+02:00",
"source": "#5oG0P6GHpN4WP25D",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:15.526 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:16.121 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:20.344+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:20.344+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:16.121 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:16.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:16.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TBhhVYtK61sajDt7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16934/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:16.760 [print] {
"resourceType": "Observation",
"id": "16934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:21.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:16.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:16.760 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:16.760 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TBhhVYtK61sajDt7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16934/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16934/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:16.760 [print] {
"resourceType": "Observation",
"id": "16934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:21.574+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:16.760 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:17.382 [print] {
"resourceType": "Observation",
"id": "16934",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:21.574+02:00",
"source": "#TBhhVYtK61sajDt7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:18.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:18.606 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:22.840+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:22.840+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:18.606 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:19.459 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:19.459 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WO8eK5pmZ3VUdT1R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16935/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:19.459 [print] {
"resourceType": "Observation",
"id": "16935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:24.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:19.459 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:19.460 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:19.460 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WO8eK5pmZ3VUdT1R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16935/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:24 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16935/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:19.460 [print] {
"resourceType": "Observation",
"id": "16935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:24.271+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:19.460 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:20.104 [print] {
"resourceType": "Observation",
"id": "16935",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:24.271+02:00",
"source": "#WO8eK5pmZ3VUdT1R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:20.704 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:21.326 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:25.531+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:25.531+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:21.326 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:23.307 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:23.307 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DaLOxGK5Ggv4G37g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16936/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:23.307 [print] {
"resourceType": "Observation",
"id": "16936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:28.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:23.307 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:23.323 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:23.323 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DaLOxGK5Ggv4G37g"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16936/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16936/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:23.323 [print] {
"resourceType": "Observation",
"id": "16936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:28.138+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:23.323 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:23.895 [print] {
"resourceType": "Observation",
"id": "16936",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:28.138+02:00",
"source": "#DaLOxGK5Ggv4G37g",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:24.479 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:25.067 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:29.298+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:29.298+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:25.068 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:25.718 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:25.718 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jN2AceHCLfurbs0S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16937/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:25.718 [print] {
"resourceType": "Observation",
"id": "16937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:30.523+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:25.718 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:25.718 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:25.718 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jN2AceHCLfurbs0S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16937/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16937/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:25.718 [print] {
"resourceType": "Observation",
"id": "16937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:30.523+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:25.718 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:26.325 [print] {
"resourceType": "Observation",
"id": "16937",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:30.523+02:00",
"source": "#jN2AceHCLfurbs0S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:26.915 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:27.522 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:31.741+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:31.741+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:27.522 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:28.154 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:28.154 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WE6R919ijciDtvur"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16938/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:28.154 [print] {
"resourceType": "Observation",
"id": "16938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:32.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:28.154 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:28.169 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:28.169 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WE6R919ijciDtvur"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16938/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16938/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:28.169 [print] {
"resourceType": "Observation",
"id": "16938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:32.974+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:28.169 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:28.754 [print] {
"resourceType": "Observation",
"id": "16938",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:32.974+02:00",
"source": "#WE6R919ijciDtvur",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:29.358 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:30.177 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:34.186+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:34.186+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:30.192 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:30.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:30.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pq7Y7iwUygQHPUEO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16939/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:30.797 [print] {
"resourceType": "Observation",
"id": "16939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:35.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:30.797 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:30.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:30.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"pq7Y7iwUygQHPUEO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16939/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16939/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:30.797 [print] {
"resourceType": "Observation",
"id": "16939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:35.597+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:30.797 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:31.410 [print] {
"resourceType": "Observation",
"id": "16939",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:35.597+02:00",
"source": "#pq7Y7iwUygQHPUEO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:32.020 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:32.602 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:36.850+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:36.850+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:32.617 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:33.504 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:33.504 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M9QXdSqp7GhRxCxi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16940/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:33.504 [print] {
"resourceType": "Observation",
"id": "16940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:38.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:33.504 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:33.504 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:33.504 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"M9QXdSqp7GhRxCxi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16940/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16940/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:33.504 [print] {
"resourceType": "Observation",
"id": "16940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:38.318+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:33.504 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:34.206 [print] {
"resourceType": "Observation",
"id": "16940",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:38.318+02:00",
"source": "#M9QXdSqp7GhRxCxi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:34.834 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:35.472 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:39.658+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:39.658+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:35.472 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:36.101 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:36.101 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WkrlKCTzIxVbi2jD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16941/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:36.101 [print] {
"resourceType": "Observation",
"id": "16941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:40.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:36.101 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:36.117 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:36.117 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"WkrlKCTzIxVbi2jD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16941/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16941/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:36.117 [print] {
"resourceType": "Observation",
"id": "16941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:40.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:36.117 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:36.737 [print] {
"resourceType": "Observation",
"id": "16941",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:40.920+02:00",
"source": "#WkrlKCTzIxVbi2jD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:37.568 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:38.523 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:42.400+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:42.400+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:38.523 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:39.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:39.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ponMn4T5d4qXsbbB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16942/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:39.226 [print] {
"resourceType": "Observation",
"id": "16942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:44.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:39.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:39.226 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:39.226 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ponMn4T5d4qXsbbB"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16942/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16942/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:39.226 [print] {
"resourceType": "Observation",
"id": "16942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:44.052+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:39.226 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:39.859 [print] {
"resourceType": "Observation",
"id": "16942",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:44.052+02:00",
"source": "#ponMn4T5d4qXsbbB",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:40.504 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:41.135 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:45.327+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:45.327+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:41.135 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:41.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:41.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9lzZ1MZLijnVIEVR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16943/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:41.777 [print] {
"resourceType": "Observation",
"id": "16943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:46.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:41.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:41.777 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:41.777 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9lzZ1MZLijnVIEVR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16943/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16943/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:41.777 [print] {
"resourceType": "Observation",
"id": "16943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:46.577+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:41.777 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:42.400 [print] {
"resourceType": "Observation",
"id": "16943",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:46.577+02:00",
"source": "#9lzZ1MZLijnVIEVR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:43.018 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:43.637 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:47.831+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:47.831+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:43.638 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:44.237 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:44.237 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d06wFEYo2EfUAUNn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16944/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:44.237 [print] {
"resourceType": "Observation",
"id": "16944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:49.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:44.237 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:44.237 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:44.237 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"d06wFEYo2EfUAUNn"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16944/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16944/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:44.237 [print] {
"resourceType": "Observation",
"id": "16944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:49.065+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:44.237 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:44.865 [print] {
"resourceType": "Observation",
"id": "16944",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:49.065+02:00",
"source": "#d06wFEYo2EfUAUNn",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:45.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:46.258 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:50.279+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:50.279+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:46.259 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:46.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:46.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XgejdgX9tUhGLeR2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16945/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:46.902 [print] {
"resourceType": "Observation",
"id": "16945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:51.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:46.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:46.902 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:46.902 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XgejdgX9tUhGLeR2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16945/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16945/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:46.902 [print] {
"resourceType": "Observation",
"id": "16945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:51.714+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:46.902 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:47.518 [print] {
"resourceType": "Observation",
"id": "16945",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:51.714+02:00",
"source": "#XgejdgX9tUhGLeR2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:48.151 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:48.768 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:52.977+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:52.977+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:48.768 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:49.385 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:49.385 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4fQDqeFDaKKVgf16"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16946/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:49.385 [print] {
"resourceType": "Observation",
"id": "16946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:54.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:49.385 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:49.400 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:49.400 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4fQDqeFDaKKVgf16"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16946/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16946/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:54 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:49.400 [print] {
"resourceType": "Observation",
"id": "16946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:54.218+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:49.400 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:50.002 [print] {
"resourceType": "Observation",
"id": "16946",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:54.218+02:00",
"source": "#4fQDqeFDaKKVgf16",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:50.645 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:51.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:55.464+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:55.464+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:51.417 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:52.120 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:52.120 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Edve6mIz8xY9U7wW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16947/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:52.120 [print] {
"resourceType": "Observation",
"id": "16947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:56.949+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:52.120 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:52.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:52.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Edve6mIz8xY9U7wW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16947/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16947/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:52.136 [print] {
"resourceType": "Observation",
"id": "16947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:56.949+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:52.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:52.718 [print] {
"resourceType": "Observation",
"id": "16947",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:56.949+02:00",
"source": "#Edve6mIz8xY9U7wW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:53.350 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:53.935 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:04:58.182+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:04:58.182+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:53.935 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:54.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:54.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mn9WfvpaRFvNZMwO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16948/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:54.620 [print] {
"resourceType": "Observation",
"id": "16948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:59.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:54.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:54.620 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:54.620 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Mn9WfvpaRFvNZMwO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16948/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:04:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16948/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:04:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:54.620 [print] {
"resourceType": "Observation",
"id": "16948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:59.429+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:54.620 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:55.190 [print] {
"resourceType": "Observation",
"id": "16948",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:04:59.429+02:00",
"source": "#Mn9WfvpaRFvNZMwO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:55.869 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:56.515 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:00.700+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:00.700+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:56.516 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:57.137 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:57.137 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zm0u9LoiPu8tr4Kp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16949/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:57.137 [print] {
"resourceType": "Observation",
"id": "16949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:01.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:57.137 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:57.138 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:57.139 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zm0u9LoiPu8tr4Kp"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16949/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:01 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16949/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:01 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:57.139 [print] {
"resourceType": "Observation",
"id": "16949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:01.951+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:04:57.139 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:04:57.754 [print] {
"resourceType": "Observation",
"id": "16949",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:01.951+02:00",
"source": "#zm0u9LoiPu8tr4Kp",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:04:58.387 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:04:59.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:03.202+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:03.202+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:04:59.014 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:59.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:59.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eqp2gpKtVCw767pz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16950/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:59.647 [print] {
"resourceType": "Observation",
"id": "16950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:04.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:59.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:04:59.647 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:04:59.647 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eqp2gpKtVCw767pz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16950/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16950/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:04:59.647 [print] {
"resourceType": "Observation",
"id": "16950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:04.481+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:04:59.647 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:01.235 [print] {
"resourceType": "Observation",
"id": "16950",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:04.481+02:00",
"source": "#eqp2gpKtVCw767pz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:01.887 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:02.494 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:06.717+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:06.717+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:02.494 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:03.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:03.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xA7hoyLnAD2knBcr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16951/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:03.099 [print] {
"resourceType": "Observation",
"id": "16951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:07.925+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:05:03.099 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:03.099 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:03.099 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xA7hoyLnAD2knBcr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16951/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:07 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16951/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:03.115 [print] {
"resourceType": "Observation",
"id": "16951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:07.925+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:05:03.115 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:03.719 [print] {
"resourceType": "Observation",
"id": "16951",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:07.925+02:00",
"source": "#xA7hoyLnAD2knBcr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:04.305 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:04.914 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:09.135+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:09.135+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:04.914 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:05.552 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:05.552 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UOWS2DwmnLRDYltA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16952/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:05.552 [print] {
"resourceType": "Observation",
"id": "16952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:10.372+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:05.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:05.552 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:05.552 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UOWS2DwmnLRDYltA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16952/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16952/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:05.552 [print] {
"resourceType": "Observation",
"id": "16952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:10.372+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:05.552 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:06.190 [print] {
"resourceType": "Observation",
"id": "16952",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:10.372+02:00",
"source": "#UOWS2DwmnLRDYltA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:06.838 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:07.647 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:11.661+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:11.661+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:07.647 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:09.267 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:09.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"My8pd8dVIjJCw4Fi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16953/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:09.267 [print] {
"resourceType": "Observation",
"id": "16953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:14.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:05:09.267 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:09.267 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:09.267 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"My8pd8dVIjJCw4Fi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16953/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16953/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:09.267 [print] {
"resourceType": "Observation",
"id": "16953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:14.066+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:05:09.267 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:09.853 [print] {
"resourceType": "Observation",
"id": "16953",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:14.066+02:00",
"source": "#My8pd8dVIjJCw4Fi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:11.041 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:11.648 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:15.874+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:15.874+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:11.648 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:12.273 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:12.273 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uvU0q1W81JwRE7bS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16954/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:12.273 [print] {
"resourceType": "Observation",
"id": "16954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:17.101+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:12.273 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:12.289 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:12.289 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uvU0q1W81JwRE7bS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16954/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16954/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:12.289 [print] {
"resourceType": "Observation",
"id": "16954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:17.101+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:12.289 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:12.875 [print] {
"resourceType": "Observation",
"id": "16954",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:17.101+02:00",
"source": "#uvU0q1W81JwRE7bS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:13.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:14.120 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:18.344+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:18.344+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:14.120 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:15.935 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:15.935 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Wdl7IQjTzrY2y9Cd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16955/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:15.935 [print] {
"resourceType": "Observation",
"id": "16955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:20.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:05:15.935 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:15.935 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:15.935 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Wdl7IQjTzrY2y9Cd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16955/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16955/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:15.935 [print] {
"resourceType": "Observation",
"id": "16955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:20.761+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:05:15.935 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:16.499 [print] {
"resourceType": "Observation",
"id": "16955",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:20.761+02:00",
"source": "#Wdl7IQjTzrY2y9Cd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:17.141 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:17.950 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:21.963+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:21.963+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:17.950 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:18.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:18.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YV6dHBAaR9qcdiqy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16956/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:18.568 [print] {
"resourceType": "Observation",
"id": "16956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:23.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:18.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:18.568 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:18.568 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YV6dHBAaR9qcdiqy"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16956/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16956/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:18.568 [print] {
"resourceType": "Observation",
"id": "16956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:23.395+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:18.568 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:19.501 [print] {
"resourceType": "Observation",
"id": "16956",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:23.395+02:00",
"source": "#YV6dHBAaR9qcdiqy",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:20.171 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 15ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 15ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:20.772 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:24.995+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:24.995+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:20.772 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:21.621 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:21.621 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RgZaSWEfl65SKHR5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16957/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:21.621 [print] {
"resourceType": "Observation",
"id": "16957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:26.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:21.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:21.621 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:21.621 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RgZaSWEfl65SKHR5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16957/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16957/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:21.621 [print] {
"resourceType": "Observation",
"id": "16957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:26.447+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:21.621 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:23.214 [print] {
"resourceType": "Observation",
"id": "16957",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:26.447+02:00",
"source": "#RgZaSWEfl65SKHR5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:24.815 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:25.401 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:29.646+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:29.646+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:25.417 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:26.034 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:26.034 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w3Uo0szg5mUajybi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16958/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:26.034 [print] {
"resourceType": "Observation",
"id": "16958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:30.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:26.034 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:26.034 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:26.034 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"w3Uo0szg5mUajybi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16958/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16958/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:26.034 [print] {
"resourceType": "Observation",
"id": "16958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:30.865+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:26.034 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:26.620 [print] {
"resourceType": "Observation",
"id": "16958",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:30.865+02:00",
"source": "#w3Uo0szg5mUajybi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:27.222 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:27.855 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:32.046+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:32.046+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:27.855 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:29.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:29.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t98nj5gWIMrLptVv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16959/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:29.162 [print] {
"resourceType": "Observation",
"id": "16959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:33.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:29.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:29.162 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:29.162 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t98nj5gWIMrLptVv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16959/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:33 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16959/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:33 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:29.162 [print] {
"resourceType": "Observation",
"id": "16959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:33.984+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:29.162 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:29.820 [print] {
"resourceType": "Observation",
"id": "16959",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:33.984+02:00",
"source": "#t98nj5gWIMrLptVv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:30.615 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:31.198 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:35.441+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:35.441+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:31.198 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:31.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:31.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hyVUbgzoSQObnwuS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16960/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:31.854 [print] {
"resourceType": "Observation",
"id": "16960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:36.674+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:31.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:31.854 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:31.854 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"hyVUbgzoSQObnwuS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16960/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16960/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:31.854 [print] {
"resourceType": "Observation",
"id": "16960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:36.674+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:31.854 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:32.423 [print] {
"resourceType": "Observation",
"id": "16960",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:36.674+02:00",
"source": "#hyVUbgzoSQObnwuS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:34.023 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:34.829 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:38.844+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:38.844+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:34.829 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:35.449 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:35.449 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TE1TR0yfZFJkixz5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16961/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:35.449 [print] {
"resourceType": "Observation",
"id": "16961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:40.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:35.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:35.449 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:35.449 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TE1TR0yfZFJkixz5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16961/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16961/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:35.449 [print] {
"resourceType": "Observation",
"id": "16961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:40.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:35.449 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:36.045 [print] {
"resourceType": "Observation",
"id": "16961",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:40.277+02:00",
"source": "#TE1TR0yfZFJkixz5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:36.845 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:37.461 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:41.671+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:41.671+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:37.461 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:38.084 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:38.084 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W47FxfEdZ6oFgUBz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16962/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:38.084 [print] {
"resourceType": "Observation",
"id": "16962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:42.921+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:38.084 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:38.100 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:38.100 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"W47FxfEdZ6oFgUBz"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16962/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16962/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:38.100 [print] {
"resourceType": "Observation",
"id": "16962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:42.921+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:38.100 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:38.786 [print] {
"resourceType": "Observation",
"id": "16962",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:42.921+02:00",
"source": "#W47FxfEdZ6oFgUBz",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:40.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:41.679 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:45.453+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:45.453+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:41.679 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:42.338 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:42.338 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2H8SW0P2fXSKbOEh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16963/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:42.338 [print] {
"resourceType": "Observation",
"id": "16963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:47.152+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:42.338 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:42.338 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:42.338 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2H8SW0P2fXSKbOEh"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16963/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16963/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:42.338 [print] {
"resourceType": "Observation",
"id": "16963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:47.152+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:42.338 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:42.957 [print] {
"resourceType": "Observation",
"id": "16963",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:47.152+02:00",
"source": "#2H8SW0P2fXSKbOEh",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:43.575 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:44.182 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:48.403+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:48.403+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:44.184 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:45.801 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:45.801 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4WKJCxzb6G18HQHQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16964/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:45.801 [print] {
"resourceType": "Observation",
"id": "16964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:50.629+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:45.801 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:45.803 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:45.803 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4WKJCxzb6G18HQHQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16964/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16964/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:45.803 [print] {
"resourceType": "Observation",
"id": "16964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:50.629+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:45.803 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:47.377 [print] {
"resourceType": "Observation",
"id": "16964",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:50.629+02:00",
"source": "#4WKJCxzb6G18HQHQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:47.966 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:48.880 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:52.789+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:52.789+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:48.880 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:49.481 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:49.481 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tMKljMKrKxJ0IP40"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16965/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:49.481 [print] {
"resourceType": "Observation",
"id": "16965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:54.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:49.481 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:49.481 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:49.481 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tMKljMKrKxJ0IP40"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16965/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:54 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16965/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:49.481 [print] {
"resourceType": "Observation",
"id": "16965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:54.302+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:49.481 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:50.159 [print] {
"resourceType": "Observation",
"id": "16965",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:54.302+02:00",
"source": "#tMKljMKrKxJ0IP40",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:50.900 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:51.534 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:55.707+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:55.707+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:51.534 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:52.161 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:52.161 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qcp2LlfJLpfxlDU3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16966/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:52.161 [print] {
"resourceType": "Observation",
"id": "16966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:56.988+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:52.161 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:52.161 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:52.161 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"qcp2LlfJLpfxlDU3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16966/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:56 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16966/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:56 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:52.161 [print] {
"resourceType": "Observation",
"id": "16966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:56.988+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:52.161 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:52.762 [print] {
"resourceType": "Observation",
"id": "16966",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:56.988+02:00",
"source": "#qcp2LlfJLpfxlDU3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:53.395 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:54.028 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:05:58.227+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:05:58.227+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:54.028 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:54.665 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:54.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gjkkCqgTw3Dr7Fut"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16967/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:54.665 [print] {
"resourceType": "Observation",
"id": "16967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:59.485+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:54.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:54.665 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:54.665 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gjkkCqgTw3Dr7Fut"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16967/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:05:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16967/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:05:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:54.665 [print] {
"resourceType": "Observation",
"id": "16967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:59.485+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:05:54.665 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:55.241 [print] {
"resourceType": "Observation",
"id": "16967",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:05:59.485+02:00",
"source": "#gjkkCqgTw3Dr7Fut",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:05:55.881 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:05:56.476 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:00.694+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:00.694+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:05:56.476 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:58.334 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:58.334 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jmYptBzWI4cFbcS2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16968/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:58.334 [print] {
"resourceType": "Observation",
"id": "16968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:03.156+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:58.334 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:05:58.334 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:05:58.334 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jmYptBzWI4cFbcS2"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16968/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16968/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:05:58.334 [print] {
"resourceType": "Observation",
"id": "16968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:03.156+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:05:58.334 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:05:59.623 [print] {
"resourceType": "Observation",
"id": "16968",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:03.156+02:00",
"source": "#jmYptBzWI4cFbcS2",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:00.273 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:00.863 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:05.098+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:05.098+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:00.863 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:01.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:01.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XUuERLBbUeOdqVcg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16969/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:01.775 [print] {
"resourceType": "Observation",
"id": "16969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:06.582+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:01.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:01.775 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:01.775 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XUuERLBbUeOdqVcg"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16969/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16969/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:05 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:01.775 [print] {
"resourceType": "Observation",
"id": "16969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:06.582+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:01.775 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:02.382 [print] {
"resourceType": "Observation",
"id": "16969",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:06.582+02:00",
"source": "#XUuERLBbUeOdqVcg",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:03.017 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:03.596 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:07.844+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:07.844+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:03.612 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:04.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:04.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eJTuu5hYvjEpVJ28"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16970/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:04.415 [print] {
"resourceType": "Observation",
"id": "16970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:09.245+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:04.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:04.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:04.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"eJTuu5hYvjEpVJ28"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16970/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16970/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:04.415 [print] {
"resourceType": "Observation",
"id": "16970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:09.245+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:04.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:05.049 [print] {
"resourceType": "Observation",
"id": "16970",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:09.245+02:00",
"source": "#eJTuu5hYvjEpVJ28",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:05.669 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:06.313 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:10.497+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:10.497+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:06.313 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:06.950 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:06.950 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"86VjSaM0e3ZhJXq8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16971/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:06.950 [print] {
"resourceType": "Observation",
"id": "16971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:11.772+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:06.950 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:06.950 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:06.950 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"86VjSaM0e3ZhJXq8"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16971/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:11 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16971/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:11 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:06.950 [print] {
"resourceType": "Observation",
"id": "16971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:11.772+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:06.950 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:07.542 [print] {
"resourceType": "Observation",
"id": "16971",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:11.772+02:00",
"source": "#86VjSaM0e3ZhJXq8",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:08.131 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:08.751 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:12.961+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:12.961+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:08.751 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:09.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:09.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ZFIh5U3NOGiWBrL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16972/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:09.402 [print] {
"resourceType": "Observation",
"id": "16972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:14.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:09.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:09.402 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:09.402 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9ZFIh5U3NOGiWBrL"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16972/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16972/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:13 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:09.402 [print] {
"resourceType": "Observation",
"id": "16972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:14.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:09.402 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:10.007 [print] {
"resourceType": "Observation",
"id": "16972",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:14.210+02:00",
"source": "#9ZFIh5U3NOGiWBrL",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:10.847 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:11.470 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:15.662+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:15.662+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:11.470 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:12.109 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:12.109 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y90Rg5SfMTAp8jw0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16973/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:12.109 [print] {
"resourceType": "Observation",
"id": "16973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:16.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:12.109 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:12.109 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:12.109 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"y90Rg5SfMTAp8jw0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16973/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16973/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:12.109 [print] {
"resourceType": "Observation",
"id": "16973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:16.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:12.109 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:12.680 [print] {
"resourceType": "Observation",
"id": "16973",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:16.930+02:00",
"source": "#y90Rg5SfMTAp8jw0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:13.311 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:13.927 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:18.140+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:18.140+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:13.927 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:14.555 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:14.555 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ej6ngBezj9Y7T1Xr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16974/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:14.555 [print] {
"resourceType": "Observation",
"id": "16974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:19.365+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:14.555 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:14.555 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:14.555 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ej6ngBezj9Y7T1Xr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16974/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16974/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:18 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:14.555 [print] {
"resourceType": "Observation",
"id": "16974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:19.365+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:14.555 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:15.159 [print] {
"resourceType": "Observation",
"id": "16974",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:19.365+02:00",
"source": "#ej6ngBezj9Y7T1Xr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:15.781 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:16.618 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:20.612+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:20.612+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:16.618 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:17.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:17.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RJLUH8rr9cxGpssd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16975/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:17.220 [print] {
"resourceType": "Observation",
"id": "16975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:22.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:17.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:17.220 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:17.220 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RJLUH8rr9cxGpssd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16975/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16975/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:17.220 [print] {
"resourceType": "Observation",
"id": "16975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:22.037+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:17.220 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:17.823 [print] {
"resourceType": "Observation",
"id": "16975",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:22.037+02:00",
"source": "#RJLUH8rr9cxGpssd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:19.447 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 8ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 8ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:20.065 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:24.278+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:24.278+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:20.065 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:20.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:20.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R5IZm3HhmLURFWQR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16976/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:20.654 [print] {
"resourceType": "Observation",
"id": "16976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:25.489+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:20.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:20.654 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:20.654 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"R5IZm3HhmLURFWQR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16976/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16976/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:20.654 [print] {
"resourceType": "Observation",
"id": "16976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:25.489+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:20.654 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:21.258 [print] {
"resourceType": "Observation",
"id": "16976",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:25.489+02:00",
"source": "#R5IZm3HhmLURFWQR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:21.865 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:22.508 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:26.692+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:26.692+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:22.508 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:23.142 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:23.142 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JEuEUUtUwXbf9G0p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16977/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:23.142 [print] {
"resourceType": "Observation",
"id": "16977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:27.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:23.142 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:23.142 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:23.142 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JEuEUUtUwXbf9G0p"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16977/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:27 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16977/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:27 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:23.142 [print] {
"resourceType": "Observation",
"id": "16977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:27.938+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:23.142 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:23.744 [print] {
"resourceType": "Observation",
"id": "16977",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:27.938+02:00",
"source": "#JEuEUUtUwXbf9G0p",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:24.644 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:25.227 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:29.466+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:29.466+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:25.227 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:25.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:25.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AshNtulZUkRBEKxr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16978/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:25.847 [print] {
"resourceType": "Observation",
"id": "16978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:30.676+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:25.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:25.847 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:25.847 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"AshNtulZUkRBEKxr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16978/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:30 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16978/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:30 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:25.847 [print] {
"resourceType": "Observation",
"id": "16978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:30.676+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:25.847 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:26.426 [print] {
"resourceType": "Observation",
"id": "16978",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:30.676+02:00",
"source": "#AshNtulZUkRBEKxr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:27.288 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:29.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:32.119+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:32.119+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:29.195 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:29.816 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:29.816 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMKTYfhtYBB41d0R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16979/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:29.816 [print] {
"resourceType": "Observation",
"id": "16979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:34.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:29.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:29.816 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:29.816 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"UMKTYfhtYBB41d0R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16979/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16979/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:29.816 [print] {
"resourceType": "Observation",
"id": "16979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:34.632+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:29.816 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:30.590 [print] {
"resourceType": "Observation",
"id": "16979",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:34.632+02:00",
"source": "#UMKTYfhtYBB41d0R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:31.169 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:31.757 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:35.997+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:35.997+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:31.757 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:32.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:32.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YeWTjkGWYRlSvSGo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16980/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:32.730 [print] {
"resourceType": "Observation",
"id": "16980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:37.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:32.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:32.730 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:32.730 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YeWTjkGWYRlSvSGo"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16980/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16980/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:32.730 [print] {
"resourceType": "Observation",
"id": "16980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:37.553+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:32.730 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:41.981 [print] {
"resourceType": "Observation",
"id": "16980",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:37.553+02:00",
"source": "#YeWTjkGWYRlSvSGo",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:42.691 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:43.299 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:47.474+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:47.474+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:43.314 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:44.887 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:44.887 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sPtIEJrJbltGKUIr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16981/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:44.887 [print] {
"resourceType": "Observation",
"id": "16981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:49.718+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:44.887 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:44.887 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:44.887 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"sPtIEJrJbltGKUIr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16981/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:49 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16981/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:44.887 [print] {
"resourceType": "Observation",
"id": "16981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:49.718+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:44.887 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:45.488 [print] {
"resourceType": "Observation",
"id": "16981",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:49.718+02:00",
"source": "#sPtIEJrJbltGKUIr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:46.084 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:46.951 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:50.894+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:50.894+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:46.951 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:47.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:47.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dvZqdXtErAofNCLR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16982/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:47.831 [print] {
"resourceType": "Observation",
"id": "16982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:52.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:47.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:47.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:47.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dvZqdXtErAofNCLR"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16982/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16982/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:47.831 [print] {
"resourceType": "Observation",
"id": "16982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:52.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:47.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:48.467 [print] {
"resourceType": "Observation",
"id": "16982",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:52.661+02:00",
"source": "#dvZqdXtErAofNCLR",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:49.121 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:49.739 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:53.945+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:53.945+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:49.739 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:50.375 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:50.375 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4abO6XRDbKhsaCo5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16983/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:50.375 [print] {
"resourceType": "Observation",
"id": "16983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:55.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:50.375 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:50.375 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:50.375 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4abO6XRDbKhsaCo5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16983/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16983/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:50.375 [print] {
"resourceType": "Observation",
"id": "16983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:55.186+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:50.375 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:50.998 [print] {
"resourceType": "Observation",
"id": "16983",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:55.186+02:00",
"source": "#4abO6XRDbKhsaCo5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:51.653 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:52.237 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:56.478+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:56.478+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:52.237 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:52.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:52.823 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8K7TN6W2KKX3htZH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16984/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:52.823 [print] {
"resourceType": "Observation",
"id": "16984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:57.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:52.823 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:52.823 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:52.823 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"8K7TN6W2KKX3htZH"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16984/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:06:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16984/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:06:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:52.823 [print] {
"resourceType": "Observation",
"id": "16984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:57.658+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:52.823 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:53.596 [print] {
"resourceType": "Observation",
"id": "16984",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:06:57.658+02:00",
"source": "#8K7TN6W2KKX3htZH",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:54.471 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:55.122 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:06:59.299+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:06:59.299+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:55.122 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:56.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:56.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OPuhWakgkkZv8sry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16985/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:56.134 [print] {
"resourceType": "Observation",
"id": "16985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:00.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:56.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:56.134 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:56.134 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OPuhWakgkkZv8sry"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16985/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16985/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:56.134 [print] {
"resourceType": "Observation",
"id": "16985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:00.930+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:06:56.134 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:06:56.909 [print] {
"resourceType": "Observation",
"id": "16985",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:00.930+02:00",
"source": "#OPuhWakgkkZv8sry",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:06:57.680 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:06:58.284 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:02.505+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:02.505+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:06:58.284 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:58.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:58.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"deQWLWDNGQ5kJ3Fs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16986/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:58.880 [print] {
"resourceType": "Observation",
"id": "16986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:03.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:58.880 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:06:58.880 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:06:58.880 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"deQWLWDNGQ5kJ3Fs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16986/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16986/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:06:58.880 [print] {
"resourceType": "Observation",
"id": "16986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:03.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:06:58.880 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:00.006 [print] {
"resourceType": "Observation",
"id": "16986",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:03.697+02:00",
"source": "#deQWLWDNGQ5kJ3Fs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:00.657 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:01.296 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:05.490+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:05.490+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:01.296 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:01.916 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:01.916 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3zJ1OOzIRKTM7Q57"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16987/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:01.916 [print] {
"resourceType": "Observation",
"id": "16987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:06.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:01.916 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:01.916 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:01.916 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3zJ1OOzIRKTM7Q57"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16987/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16987/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:01.916 [print] {
"resourceType": "Observation",
"id": "16987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:06.742+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:01.916 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:02.480 [print] {
"resourceType": "Observation",
"id": "16987",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:06.742+02:00",
"source": "#3zJ1OOzIRKTM7Q57",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:03.118 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:03.687 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:07.945+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:07.945+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:03.687 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:04.335 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:04.335 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xryqXWQsy9YzTG13"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16988/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:04.335 [print] {
"resourceType": "Observation",
"id": "16988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:09.159+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:04.335 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:04.335 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:04.335 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"xryqXWQsy9YzTG13"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16988/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16988/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:04.335 [print] {
"resourceType": "Observation",
"id": "16988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:09.159+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:04.335 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:04.968 [print] {
"resourceType": "Observation",
"id": "16988",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:09.159+02:00",
"source": "#xryqXWQsy9YzTG13",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:05.606 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:07.489 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:10.432+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:10.432+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:07.489 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:08.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:08.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zkvKO97jVOFkxr1k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16989/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:08.194 [print] {
"resourceType": "Observation",
"id": "16989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:13.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:08.194 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:08.194 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:08.194 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zkvKO97jVOFkxr1k"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16989/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:13 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16989/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:08.194 [print] {
"resourceType": "Observation",
"id": "16989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:13.014+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:08.194 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:08.826 [print] {
"resourceType": "Observation",
"id": "16989",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:13.014+02:00",
"source": "#zkvKO97jVOFkxr1k",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:09.411 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:10.014 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:14.247+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:14.247+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:10.014 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:12.046 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:12.046 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fWTeCMhRc4jEiYVY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16990/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:12.046 [print] {
"resourceType": "Observation",
"id": "16990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:16.873+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:12.046 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:12.046 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:12.046 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fWTeCMhRc4jEiYVY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16990/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16990/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:12.046 [print] {
"resourceType": "Observation",
"id": "16990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:16.873+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:12.046 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:12.853 [print] {
"resourceType": "Observation",
"id": "16990",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:16.873+02:00",
"source": "#fWTeCMhRc4jEiYVY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:13.771 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:14.383 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:18.597+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:18.597+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:14.383 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:15.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:15.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B64UiQlZOFIiR8hU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16991/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:15.233 [print] {
"resourceType": "Observation",
"id": "16991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:20.053+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:15.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:15.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:15.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"B64UiQlZOFIiR8hU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16991/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16991/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:15.233 [print] {
"resourceType": "Observation",
"id": "16991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:20.053+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:15.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:15.819 [print] {
"resourceType": "Observation",
"id": "16991",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:20.053+02:00",
"source": "#B64UiQlZOFIiR8hU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:16.452 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:17.007 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:21.273+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:21.273+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:17.007 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:17.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:17.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lXxBx1NIJfHR0244"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16992/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:17.817 [print] {
"resourceType": "Observation",
"id": "16992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:22.642+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:17.817 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:17.817 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:17.817 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lXxBx1NIJfHR0244"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16992/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16992/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:17.817 [print] {
"resourceType": "Observation",
"id": "16992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:22.642+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:17.817 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:18.464 [print] {
"resourceType": "Observation",
"id": "16992",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:22.642+02:00",
"source": "#lXxBx1NIJfHR0244",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:19.039 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:19.698 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:23.875+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:23.875+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:19.713 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:20.438 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:20.438 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"InR33sBr3WStn3So"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16993/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:20.439 [print] {
"resourceType": "Observation",
"id": "16993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:25.251+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:20.439 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:20.441 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:20.441 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"InR33sBr3WStn3So"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16993/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16993/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:20.441 [print] {
"resourceType": "Observation",
"id": "16993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:25.251+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:20.441 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:22.027 [print] {
"resourceType": "Observation",
"id": "16993",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:25.251+02:00",
"source": "#InR33sBr3WStn3So",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:23.658 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:24.352 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:28.482+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:28.482+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:24.353 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:25.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:25.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3no0CBMiMPwTuuqt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16994/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:25.048 [print] {
"resourceType": "Observation",
"id": "16994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:29.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:25.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:25.048 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:25.048 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"3no0CBMiMPwTuuqt"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16994/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16994/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:25.048 [print] {
"resourceType": "Observation",
"id": "16994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:29.845+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:25.048 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:25.816 [print] {
"resourceType": "Observation",
"id": "16994",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:29.845+02:00",
"source": "#3no0CBMiMPwTuuqt",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:26.764 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:27.369 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:31.589+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:31.589+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:27.369 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:28.000 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:28.000 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F4I6BNTsfutlgDKc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16995/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:28.000 [print] {
"resourceType": "Observation",
"id": "16995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:32.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:28.000 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:28.001 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:28.001 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"F4I6BNTsfutlgDKc"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16995/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16995/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:28.001 [print] {
"resourceType": "Observation",
"id": "16995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:32.791+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:28.001 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:28.586 [print] {
"resourceType": "Observation",
"id": "16995",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:32.791+02:00",
"source": "#F4I6BNTsfutlgDKc",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:29.206 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:29.946 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:34.035+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:34.035+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:29.946 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:30.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:30.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FxBwke6vzOOow9AZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16996/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:30.569 [print] {
"resourceType": "Observation",
"id": "16996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:35.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:30.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:30.569 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:30.569 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FxBwke6vzOOow9AZ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16996/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16996/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:35 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:30.569 [print] {
"resourceType": "Observation",
"id": "16996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:35.391+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:30.569 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:31.178 [print] {
"resourceType": "Observation",
"id": "16996",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:35.391+02:00",
"source": "#FxBwke6vzOOow9AZ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:33.001 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:33.808 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:37.628+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:37.628+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:33.809 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:35.407 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:35.407 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Uibf52GmOwrMz0wO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16997/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:35.407 [print] {
"resourceType": "Observation",
"id": "16997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:40.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:35.407 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:35.407 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:35.407 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Uibf52GmOwrMz0wO"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16997/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:40 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16997/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:40 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:35.407 [print] {
"resourceType": "Observation",
"id": "16997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:40.227+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:35.407 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:36.022 [print] {
"resourceType": "Observation",
"id": "16997",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:40.227+02:00",
"source": "#Uibf52GmOwrMz0wO",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:36.667 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:37.272 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:41.485+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:41.485+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:37.273 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:37.907 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:37.907 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2YuKovoquLndOVev"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16998/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:37.907 [print] {
"resourceType": "Observation",
"id": "16998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:42.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:37.907 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:37.908 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:37.908 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"2YuKovoquLndOVev"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16998/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16998/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:42 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:37.908 [print] {
"resourceType": "Observation",
"id": "16998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:42.730+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:37.908 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:38.541 [print] {
"resourceType": "Observation",
"id": "16998",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:42.730+02:00",
"source": "#2YuKovoquLndOVev",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:39.176 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:39.795 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:43.985+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:43.985+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:39.796 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:41.393 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:41.393 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zfuyky189zZYrEi1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16999/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:41.394 [print] {
"resourceType": "Observation",
"id": "16999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:46.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:41.394 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:41.395 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:41.395 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Zfuyky189zZYrEi1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16999/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:46 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/16999/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:46 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:41.395 [print] {
"resourceType": "Observation",
"id": "16999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:46.210+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:41.395 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:42.029 [print] {
"resourceType": "Observation",
"id": "16999",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:46.210+02:00",
"source": "#Zfuyky189zZYrEi1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:42.616 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:43.234 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:47.450+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:47.450+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:43.234 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:43.898 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:43.898 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HhNl0MZXMVUhQa1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17000/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:43.898 [print] {
"resourceType": "Observation",
"id": "17000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:48.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:43.898 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:43.898 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:43.898 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"HhNl0MZXMVUhQa1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17000/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:48 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17000/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:48 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:43.898 [print] {
"resourceType": "Observation",
"id": "17000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:48.719+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:43.898 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:44.506 [print] {
"resourceType": "Observation",
"id": "17000",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:48.719+02:00",
"source": "#HhNl0MZXMVUhQa1G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:45.356 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:45.958 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:50.175+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:50.175+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:45.958 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:46.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:46.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gnD7dR791uLoUmsl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17001/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:46.591 [print] {
"resourceType": "Observation",
"id": "17001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:51.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:46.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:46.591 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:46.591 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"gnD7dR791uLoUmsl"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17001/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:51 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17001/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:51 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:46.591 [print] {
"resourceType": "Observation",
"id": "17001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:51.414+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:46.591 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:47.178 [print] {
"resourceType": "Observation",
"id": "17001",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:51.414+02:00",
"source": "#gnD7dR791uLoUmsl",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:47.778 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:48.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:52.608+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:52.608+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:48.432 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:49.030 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:49.030 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L4uC8oUmxQkc2g3u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17002/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:49.030 [print] {
"resourceType": "Observation",
"id": "17002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:53.844+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:49.030 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:49.034 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:49.034 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L4uC8oUmxQkc2g3u"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17002/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17002/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:49.034 [print] {
"resourceType": "Observation",
"id": "17002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:53.844+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:49.034 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:51.911 [print] {
"resourceType": "Observation",
"id": "17002",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:53.844+02:00",
"source": "#L4uC8oUmxQkc2g3u",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:52.514 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:53.348 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:07:57.332+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:07:57.332+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:53.348 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:54.332 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:54.332 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TwcHurQL8TU96b2s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17003/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:54.332 [print] {
"resourceType": "Observation",
"id": "17003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:59.146+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:54.332 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:54.333 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:54.333 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"TwcHurQL8TU96b2s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17003/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:07:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17003/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:07:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:54.334 [print] {
"resourceType": "Observation",
"id": "17003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:59.146+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:07:54.334 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:56.964 [print] {
"resourceType": "Observation",
"id": "17003",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:07:59.146+02:00",
"source": "#TwcHurQL8TU96b2s",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:07:57.602 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:07:58.196 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:02.427+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:02.427+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:07:58.196 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:59.230 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:59.230 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uak1FQZN8mmDtaNX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17004/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:59.230 [print] {
"resourceType": "Observation",
"id": "17004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:04.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:59.230 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:07:59.230 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:07:59.230 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uak1FQZN8mmDtaNX"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17004/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:04 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17004/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:07:59.230 [print] {
"resourceType": "Observation",
"id": "17004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:04.051+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:07:59.230 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:07:59.882 [print] {
"resourceType": "Observation",
"id": "17004",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:04.051+02:00",
"source": "#uak1FQZN8mmDtaNX",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:00.566 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:01.207 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:05.390+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:05.390+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:01.208 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:02.017 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:02.017 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"02ySxi70JDSD6CZD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17005/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:02.017 [print] {
"resourceType": "Observation",
"id": "17005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:06.832+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:08:02.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:02.017 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:02.017 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"02ySxi70JDSD6CZD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17005/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17005/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:02.017 [print] {
"resourceType": "Observation",
"id": "17005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:06.832+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:08:02.017 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:02.598 [print] {
"resourceType": "Observation",
"id": "17005",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:06.832+02:00",
"source": "#02ySxi70JDSD6CZD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:03.503 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:04.174 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:08.330+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:08.330+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:04.174 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:04.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:04.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yhgvwIB40JT3WvtQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17006/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:04.831 [print] {
"resourceType": "Observation",
"id": "17006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:09.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:04.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:04.831 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:04.831 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yhgvwIB40JT3WvtQ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17006/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:09 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17006/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:04.831 [print] {
"resourceType": "Observation",
"id": "17006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:09.648+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:04.831 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:05.473 [print] {
"resourceType": "Observation",
"id": "17006",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:09.648+02:00",
"source": "#yhgvwIB40JT3WvtQ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:06.082 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:06.718 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:10.907+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:10.907+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:06.719 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:07.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:07.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ug3Uoj4yJKxwlBo3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17007/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:07.626 [print] {
"resourceType": "Observation",
"id": "17007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:12.451+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:08:07.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:07.626 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3029"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:07.626 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ug3Uoj4yJKxwlBo3"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17007/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17007/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:07.626 [print] {
"resourceType": "Observation",
"id": "17007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:12.451+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
> *
print COOKIES
12:08:07.626 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:08.616 [print] {
"resourceType": "Observation",
"id": "17007",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:12.451+02:00",
"source": "#ug3Uoj4yJKxwlBo3",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6577-6 ",
"display": "Negativo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:09.205 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:09.780 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:14.025+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:14.025+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:09.781 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:10.378 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:10.378 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lAH4LytUgLCLSyri"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17008/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:10.378 [print] {
"resourceType": "Observation",
"id": "17008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:15.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:10.378 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:10.378 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:10.378 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lAH4LytUgLCLSyri"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17008/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17008/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:15 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:10.378 [print] {
"resourceType": "Observation",
"id": "17008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:15.197+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:10.378 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:10.951 [print] {
"resourceType": "Observation",
"id": "17008",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:15.197+02:00",
"source": "#lAH4LytUgLCLSyri",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:11.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:12.266 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:16.500+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:16.500+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:12.267 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:12.883 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:12.883 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wQQ4kfhIbOk2t884"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17009/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:12.884 [print] {
"resourceType": "Observation",
"id": "17009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:17.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:12.884 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:12.885 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:12.885 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"wQQ4kfhIbOk2t884"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17009/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:17 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17009/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:17 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:12.885 [print] {
"resourceType": "Observation",
"id": "17009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:17.697+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:12.885 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:13.756 [print] {
"resourceType": "Observation",
"id": "17009",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:17.697+02:00",
"source": "#wQQ4kfhIbOk2t884",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:14.373 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:15.248 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:19.196+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:19.196+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:15.249 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:15.839 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:15.839 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uqVYJjCgU1S7Inb5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17010/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:15.839 [print] {
"resourceType": "Observation",
"id": "17010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:20.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:15.839 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:15.841 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:15.841 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"uqVYJjCgU1S7Inb5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17010/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:20 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17010/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:20 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:15.841 [print] {
"resourceType": "Observation",
"id": "17010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:20.661+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:15.841 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:16.464 [print] {
"resourceType": "Observation",
"id": "17010",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:20.661+02:00",
"source": "#uqVYJjCgU1S7Inb5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:17.060 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:17.901 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:21.880+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:21.880+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:17.901 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:18.797 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:18.797 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rkk8IhsDOg28JZ3s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17011/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:18.797 [print] {
"resourceType": "Observation",
"id": "17011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:23.614+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:18.798 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:18.799 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:18.799 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rkk8IhsDOg28JZ3s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17011/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17011/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:23 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:18.799 [print] {
"resourceType": "Observation",
"id": "17011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:23.614+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:18.799 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:21.406 [print] {
"resourceType": "Observation",
"id": "17011",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:23.614+02:00",
"source": "#Rkk8IhsDOg28JZ3s",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:22.038 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:22.755 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:26.857+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:26.857+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:22.755 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:23.830 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:23.830 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lKk8G9O4jGflcjWq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17012/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:23.830 [print] {
"resourceType": "Observation",
"id": "17012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:28.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:23.830 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:23.845 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:23.845 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lKk8G9O4jGflcjWq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17012/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17012/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:23.845 [print] {
"resourceType": "Observation",
"id": "17012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:28.650+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:23.845 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:24.450 [print] {
"resourceType": "Observation",
"id": "17012",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:28.650+02:00",
"source": "#lKk8G9O4jGflcjWq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:25.308 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:25.893 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:30.142+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:30.142+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:25.893 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:26.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:26.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NKc1WHjjJ9FhuW5r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17013/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:26.549 [print] {
"resourceType": "Observation",
"id": "17013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:31.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:26.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:26.549 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:26.549 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NKc1WHjjJ9FhuW5r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17013/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:31 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17013/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:26.549 [print] {
"resourceType": "Observation",
"id": "17013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:31.361+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:26.549 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:27.185 [print] {
"resourceType": "Observation",
"id": "17013",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:31.361+02:00",
"source": "#NKc1WHjjJ9FhuW5r",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19710-5",
"display": "A"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:27.971 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:28.624 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:32.600+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:32.600+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:28.625 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:29.248 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:29.248 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VHtBhDamHuRSS0mT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17014/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:29.248 [print] {
"resourceType": "Observation",
"id": "17014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:34.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:29.248 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:29.263 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:29.263 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"VHtBhDamHuRSS0mT"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17014/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17014/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:29.263 [print] {
"resourceType": "Observation",
"id": "17014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:34.075+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:29.263 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:29.864 [print] {
"resourceType": "Observation",
"id": "17014",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:34.075+02:00",
"source": "#VHtBhDamHuRSS0mT",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:30.518 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:31.102 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:35.332+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:35.332+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:31.104 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:31.728 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:31.728 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7QqvVh9x9WIceLTi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17015/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:31.728 [print] {
"resourceType": "Observation",
"id": "17015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:36.552+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:31.728 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:31.728 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:31.728 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7QqvVh9x9WIceLTi"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17015/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:36 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17015/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:31.728 [print] {
"resourceType": "Observation",
"id": "17015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:36.552+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:31.728 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:32.335 [print] {
"resourceType": "Observation",
"id": "17015",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:36.552+02:00",
"source": "#7QqvVh9x9WIceLTi",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:32.921 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:33.543 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:37.743+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:37.743+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:33.544 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:34.130 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:34.145 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rp9274GbfNoW8uCa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17016/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:34.145 [print] {
"resourceType": "Observation",
"id": "17016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:38.965+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:34.145 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:34.145 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:34.145 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Rp9274GbfNoW8uCa"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17016/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:38 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17016/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:38 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:34.145 [print] {
"resourceType": "Observation",
"id": "17016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:38.965+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:34.145 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:34.809 [print] {
"resourceType": "Observation",
"id": "17016",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:38.965+02:00",
"source": "#Rp9274GbfNoW8uCa",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:35.622 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:36.222 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:40.448+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:40.448+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:36.222 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:36.860 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:36.860 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GFnLYhFlcpRoah70"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17017/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:36.860 [print] {
"resourceType": "Observation",
"id": "17017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:41.674+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:36.860 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:36.860 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:36.860 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"GFnLYhFlcpRoah70"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17017/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:41 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17017/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:36.860 [print] {
"resourceType": "Observation",
"id": "17017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:41.674+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:36.860 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:37.445 [print] {
"resourceType": "Observation",
"id": "17017",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:41.674+02:00",
"source": "#GFnLYhFlcpRoah70",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:38.231 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:38.833 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:43.055+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:43.055+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:38.833 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:39.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:39.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dujBqqC1B2hUL1Cq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17018/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:39.451 [print] {
"resourceType": "Observation",
"id": "17018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:44.270+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:39.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:39.451 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:39.451 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dujBqqC1B2hUL1Cq"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17018/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:44 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17018/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:39.451 [print] {
"resourceType": "Observation",
"id": "17018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:44.270+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:39.451 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:40.121 [print] {
"resourceType": "Observation",
"id": "17018",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:44.270+02:00",
"source": "#dujBqqC1B2hUL1Cq",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:41.713 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:42.331 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:46.544+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:46.544+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:42.331 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:42.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:42.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i3g2lFjWt45acFnA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17019/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:42.936 [print] {
"resourceType": "Observation",
"id": "17019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:47.760+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:42.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:42.936 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:42.936 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"i3g2lFjWt45acFnA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17019/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17019/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:42.936 [print] {
"resourceType": "Observation",
"id": "17019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:47.760+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:42.936 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:43.525 [print] {
"resourceType": "Observation",
"id": "17019",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:47.760+02:00",
"source": "#i3g2lFjWt45acFnA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:44.159 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:44.783 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:48.983+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:48.983+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:44.783 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:45.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:45.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lztTb3QuAFWdaFOd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17020/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:45.415 [print] {
"resourceType": "Observation",
"id": "17020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:50.241+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:45.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:45.415 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:45.415 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"lztTb3QuAFWdaFOd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17020/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17020/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:50 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:45.415 [print] {
"resourceType": "Observation",
"id": "17020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:50.241+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:45.415 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:45.978 [print] {
"resourceType": "Observation",
"id": "17020",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:50.241+02:00",
"source": "#lztTb3QuAFWdaFOd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:46.598 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:47.225 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:51.429+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:51.429+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:47.225 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:47.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:47.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JxuS9VUoKvQH7z49"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17021/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:47.909 [print] {
"resourceType": "Observation",
"id": "17021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:52.717+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:47.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:47.909 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3026"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:47.909 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JxuS9VUoKvQH7z49"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17021/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:52 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17021/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:52 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:47.909 [print] {
"resourceType": "Observation",
"id": "17021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:52.717+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:47.909 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:48.536 [print] {
"resourceType": "Observation",
"id": "17021",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:52.717+02:00",
"source": "#JxuS9VUoKvQH7z49",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19709-7",
"display": "B"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:49.378 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:49.979 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:54.156+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:54.156+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:49.979 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:50.590 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:50.590 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5oipo0XSjSLn4lVW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17022/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:50.590 [print] {
"resourceType": "Observation",
"id": "17022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:55.412+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:50.590 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:50.590 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:50.590 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5oipo0XSjSLn4lVW"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17022/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:55 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17022/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:55 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:50.590 [print] {
"resourceType": "Observation",
"id": "17022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:55.412+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:50.590 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:51.165 [print] {
"resourceType": "Observation",
"id": "17022",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:55.412+02:00",
"source": "#5oipo0XSjSLn4lVW",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:51.817 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:52.419 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:56.630+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:56.630+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:52.419 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:53.529 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:53.529 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fFbaNgrhKZ6YaQtS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17023/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:53.529 [print] {
"resourceType": "Observation",
"id": "17023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:58.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:53.529 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:53.529 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:53.529 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"fFbaNgrhKZ6YaQtS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17023/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:08:58 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17023/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:08:58 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:53.529 [print] {
"resourceType": "Observation",
"id": "17023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:58.337+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:53.529 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:54.131 [print] {
"resourceType": "Observation",
"id": "17023",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:08:58.337+02:00",
"source": "#fFbaNgrhKZ6YaQtS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:54.749 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:55.347 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:08:59.584+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:08:59.584+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:55.349 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:55.959 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:55.959 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Re8SApcz50aLC29Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17024/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:55.959 [print] {
"resourceType": "Observation",
"id": "17024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:00.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:55.959 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:55.960 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:55.960 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"Re8SApcz50aLC29Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17024/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:00 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17024/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:00 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:55.961 [print] {
"resourceType": "Observation",
"id": "17024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:00.777+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:08:55.961 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:56.516 [print] {
"resourceType": "Observation",
"id": "17024",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:00.777+02:00",
"source": "#Re8SApcz50aLC29Z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:57.181 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:08:57.797 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:02.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:02.004+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:08:57.803 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:58.427 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:58.427 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yMtPVJS40qIl9wLA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17025/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:58.427 [print] {
"resourceType": "Observation",
"id": "17025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:03.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:58.427 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:08:58.427 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:08:58.427 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"yMtPVJS40qIl9wLA"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17025/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17025/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:03 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:08:58.427 [print] {
"resourceType": "Observation",
"id": "17025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:03.231+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:08:58.427 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:08:59.029 [print] {
"resourceType": "Observation",
"id": "17025",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:03.231+02:00",
"source": "#yMtPVJS40qIl9wLA",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:08:59.662 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:00.567 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:04.482+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:04.482+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:00.567 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:01.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:01.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7SZZPYHeioDAFLym"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17026/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:01.233 [print] {
"resourceType": "Observation",
"id": "17026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:06.056+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:01.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:01.233 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:01.233 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7SZZPYHeioDAFLym"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17026/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:06 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17026/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:06 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:01.233 [print] {
"resourceType": "Observation",
"id": "17026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:06.056+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:01.233 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:01.819 [print] {
"resourceType": "Observation",
"id": "17026",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:06.056+02:00",
"source": "#7SZZPYHeioDAFLym",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:02.414 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:02.999 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:07.229+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:07.229+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:02.999 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:03.605 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:03.605 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FV0l6weaxTUWce0s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17027/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:03.605 [print] {
"resourceType": "Observation",
"id": "17027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:08.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:03.605 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:03.605 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3027"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:03.605 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"FV0l6weaxTUWce0s"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17027/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17027/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:08 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:03.605 [print] {
"resourceType": "Observation",
"id": "17027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:08.428+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:03.605 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:04.210 [print] {
"resourceType": "Observation",
"id": "17027",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:08.428+02:00",
"source": "#FV0l6weaxTUWce0s",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA19708-9 ",
"display": "0"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:04.837 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:05.415 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:09.660+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:09.660+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:05.415 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:06.041 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:06.041 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tjB5eHQkNRG3SnPs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17028/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:06.041 [print] {
"resourceType": "Observation",
"id": "17028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:10.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:06.041 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:06.047 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:06.047 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"tjB5eHQkNRG3SnPs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17028/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17028/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:10 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:06.047 [print] {
"resourceType": "Observation",
"id": "17028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:10.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:06.047 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:06.631 [print] {
"resourceType": "Observation",
"id": "17028",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:10.868+02:00",
"source": "#tjB5eHQkNRG3SnPs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:08.224 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:08.827 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:13.051+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:13.051+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:08.827 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:09.466 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:09.466 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jSVm1nwiH6HmcPr7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17029/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:09.466 [print] {
"resourceType": "Observation",
"id": "17029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:14.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:09.466 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:09.466 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:09.466 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"jSVm1nwiH6HmcPr7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17029/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:14 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17029/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:09.466 [print] {
"resourceType": "Observation",
"id": "17029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:14.284+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:09.466 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:10.068 [print] {
"resourceType": "Observation",
"id": "17029",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:14.284+02:00",
"source": "#jSVm1nwiH6HmcPr7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:10.700 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:11.334 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:15.537+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:15.537+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:11.334 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:11.952 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:11.952 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NDeMNlGUvYKR7fXS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17030/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:11.952 [print] {
"resourceType": "Observation",
"id": "17030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:16.767+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:11.952 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:11.952 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:11.952 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NDeMNlGUvYKR7fXS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17030/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:16 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17030/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:16 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:11.952 [print] {
"resourceType": "Observation",
"id": "17030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:16.767+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:11.952 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:12.554 [print] {
"resourceType": "Observation",
"id": "17030",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:16.767+02:00",
"source": "#NDeMNlGUvYKR7fXS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:13.195 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:13.758 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:18.021+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:18.021+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:13.758 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:14.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:14.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7DBLiNcV5psuVU5S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17031/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:14.382 [print] {
"resourceType": "Observation",
"id": "17031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:19.205+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:14.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:14.382 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:14.382 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"7DBLiNcV5psuVU5S"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17031/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17031/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:14.382 [print] {
"resourceType": "Observation",
"id": "17031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:19.205+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:14.382 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:14.945 [print] {
"resourceType": "Observation",
"id": "17031",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:19.205+02:00",
"source": "#7DBLiNcV5psuVU5S",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:15.520 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 7ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 7ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:16.148 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:20.350+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:20.350+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:16.148 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:16.750 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:16.750 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T62CRdAcXUL9dxky"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17032/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:16.750 [print] {
"resourceType": "Observation",
"id": "17032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:21.582+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:16.750 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:16.750 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:16.750 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"T62CRdAcXUL9dxky"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17032/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:21 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17032/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:21 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:16.750 [print] {
"resourceType": "Observation",
"id": "17032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:21.582+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:16.750 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:17.335 [print] {
"resourceType": "Observation",
"id": "17032",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:21.582+02:00",
"source": "#T62CRdAcXUL9dxky",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:17.953 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:18.554 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:22.785+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:22.785+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:18.569 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:19.171 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:19.171 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9kxL4EQODOKeIwq5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17033/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:19.171 [print] {
"resourceType": "Observation",
"id": "17033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:23.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:19.171 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:19.171 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"3028"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:19.171 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"9kxL4EQODOKeIwq5"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17033/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:23 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17033/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:24 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:19.171 [print] {
"resourceType": "Observation",
"id": "17033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:23.998+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
> *
print COOKIES
12:09:19.171 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:19.814 [print] {
"resourceType": "Observation",
"id": "17033",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:23.998+02:00",
"source": "#9kxL4EQODOKeIwq5",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
},
"component": [
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "883-9",
"display": "ABO group [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA28449-9 ",
"display": "AB"
}
]
}
},
{
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "10331-7",
"display": "Rh [Type] in Blood"
}
]
},
"valueCodeableConcept": {
"coding": [
{
"system": "http://loinc.org",
"code": "LA6576-8",
"display": "Positivo"
}
]
}
}
]
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:20.435 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:21.083 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:25.270+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:25.270+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:21.083 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:21.970 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:21.970 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t5bjkuKbdlIxwOth"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17034/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:21.970 [print] {
"resourceType": "Observation",
"id": "17034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:26.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:21.970 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:21.970 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:21.970 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"t5bjkuKbdlIxwOth"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17034/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:26 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17034/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:26 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:21.970 [print] {
"resourceType": "Observation",
"id": "17034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:26.793+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:21.970 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:23.042 [print] {
"resourceType": "Observation",
"id": "17034",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:26.793+02:00",
"source": "#t5bjkuKbdlIxwOth",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:23.672 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:24.360 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:28.495+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:28.495+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:24.360 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:24.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:24.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JD2BuxZrfFI6pYhF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17035/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:24.956 [print] {
"resourceType": "Observation",
"id": "17035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:29.785+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:24.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:24.956 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:24.956 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"JD2BuxZrfFI6pYhF"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17035/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:29 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17035/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:29 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:24.956 [print] {
"resourceType": "Observation",
"id": "17035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:29.785+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:24.956 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:25.558 [print] {
"resourceType": "Observation",
"id": "17035",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:29.785+02:00",
"source": "#JD2BuxZrfFI6pYhF",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:26.175 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 3ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 3ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:27.128 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:31.004+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:31.004+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:27.128 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:27.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:27.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RdJqWDxnBGFHqF2r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17036/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:27.774 [print] {
"resourceType": "Observation",
"id": "17036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:32.587+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:27.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:27.774 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:27.774 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"RdJqWDxnBGFHqF2r"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17036/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17036/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:31 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:27.774 [print] {
"resourceType": "Observation",
"id": "17036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:32.587+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:27.774 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:28.364 [print] {
"resourceType": "Observation",
"id": "17036",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:32.587+02:00",
"source": "#RdJqWDxnBGFHqF2r",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:28.948 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:29.582 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:33.784+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:33.784+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:29.582 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:30.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:30.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0HS05YDNpDXptoWs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17037/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:30.215 [print] {
"resourceType": "Observation",
"id": "17037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:35.029+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:30.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:30.215 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:30.215 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"0HS05YDNpDXptoWs"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17037/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:35 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17037/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:30.215 [print] {
"resourceType": "Observation",
"id": "17037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:35.029+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:30.215 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:30.788 [print] {
"resourceType": "Observation",
"id": "17037",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:35.029+02:00",
"source": "#0HS05YDNpDXptoWs",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:31.390 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:32.023 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:36.211+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:36.211+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:32.023 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:32.609 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:32.609 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"29XJ0gAtSDzAtq1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17038/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:32.609 [print] {
"resourceType": "Observation",
"id": "17038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:37.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:32.609 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:32.609 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:32.609 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"29XJ0gAtSDzAtq1G"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17038/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17038/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:36 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:32.609 [print] {
"resourceType": "Observation",
"id": "17038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:37.436+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:32.609 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:33.224 [print] {
"resourceType": "Observation",
"id": "17038",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:37.436+02:00",
"source": "#29XJ0gAtSDzAtq1G",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:33.870 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 9ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 9ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:34.475 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:38.682+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:38.682+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:34.475 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:35.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:35.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"are2mvFL7lTV4rlD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17039/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:35.093 [print] {
"resourceType": "Observation",
"id": "17039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:39.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:35.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:35.093 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:35.093 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"are2mvFL7lTV4rlD"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17039/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17039/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:35.093 [print] {
"resourceType": "Observation",
"id": "17039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:39.920+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:35.093 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:35.697 [print] {
"resourceType": "Observation",
"id": "17039",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:39.920+02:00",
"source": "#are2mvFL7lTV4rlD",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:36.298 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:36.931 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:41.136+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:41.136+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:36.931 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:37.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:37.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YTclPIDZ9IeFkamr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17040/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:37.548 [print] {
"resourceType": "Observation",
"id": "17040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:42.364+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:37.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:37.548 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:37.548 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"YTclPIDZ9IeFkamr"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17040/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:42 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17040/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:41 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:37.548 [print] {
"resourceType": "Observation",
"id": "17040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:42.364+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:37.548 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:38.164 [print] {
"resourceType": "Observation",
"id": "17040",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:42.364+02:00",
"source": "#YTclPIDZ9IeFkamr",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:38.836 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:39.839 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:43.657+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:43.657+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:39.839 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:40.429 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:40.429 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L0G27XaaFysk5ZCU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17041/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:40.429 [print] {
"resourceType": "Observation",
"id": "17041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:45.260+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:40.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:40.429 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:40.429 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"L0G27XaaFysk5ZCU"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17041/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:45 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17041/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:44 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:40.429 [print] {
"resourceType": "Observation",
"id": "17041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:45.260+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:40.429 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:41.299 [print] {
"resourceType": "Observation",
"id": "17041",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:45.260+02:00",
"source": "#L0G27XaaFysk5ZCU",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:41.917 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:42.518 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:46.748+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:46.748+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:42.518 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:43.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:43.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DWk2Kcn61R1iRkvC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17042/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:43.136 [print] {
"resourceType": "Observation",
"id": "17042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:47.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:43.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:43.136 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:43.136 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"DWk2Kcn61R1iRkvC"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17042/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:47 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17042/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:47 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:43.136 [print] {
"resourceType": "Observation",
"id": "17042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:47.950+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:43.136 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:43.753 [print] {
"resourceType": "Observation",
"id": "17042",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:47.950+02:00",
"source": "#DWk2Kcn61R1iRkvC",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:44.360 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:44.978 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:49.195+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:49.195+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:44.978 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:45.611 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:45.611 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KOb2UtO9NAGITYih"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17043/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:45.611 [print] {
"resourceType": "Observation",
"id": "17043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:50.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:45.611 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:45.614 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:45.614 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KOb2UtO9NAGITYih"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17043/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:50 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17043/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:49 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:45.614 [print] {
"resourceType": "Observation",
"id": "17043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:50.419+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:45.614 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:46.223 [print] {
"resourceType": "Observation",
"id": "17043",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:50.419+02:00",
"source": "#KOb2UtO9NAGITYih",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:47.045 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:47.630 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:51.878+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:51.878+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:47.630 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:48.827 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:48.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6mqzTtyz1ktmgcFe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17044/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:48.834 [print] {
"resourceType": "Observation",
"id": "17044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:53.646+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:48.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:48.834 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:48.834 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"6mqzTtyz1ktmgcFe"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17044/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:53 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17044/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:53 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:48.834 [print] {
"resourceType": "Observation",
"id": "17044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:53.646+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:48.834 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:49.413 [print] {
"resourceType": "Observation",
"id": "17044",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:53.646+02:00",
"source": "#6mqzTtyz1ktmgcFe",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:51.022 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:51.577 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:55.846+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:55.846+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:51.577 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:52.241 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:52.241 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5xzyEqo4YyIViJKG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17045/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:52.241 [print] {
"resourceType": "Observation",
"id": "17045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:57.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:52.241 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:52.241 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:52.241 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"5xzyEqo4YyIViJKG"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17045/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:57 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17045/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:57 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:52.241 [print] {
"resourceType": "Observation",
"id": "17045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:57.045+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:52.241 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:53.016 [print] {
"resourceType": "Observation",
"id": "17045",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:57.045+02:00",
"source": "#5xzyEqo4YyIViJKG",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:53.619 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:54.263 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:09:58.451+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:09:58.451+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:54.264 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:54.867 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:54.867 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BlafhaJ50aFaza8R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17046/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:54.867 [print] {
"resourceType": "Observation",
"id": "17046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:59.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:54.867 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:54.868 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:54.868 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"BlafhaJ50aFaza8R"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17046/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:09:59 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17046/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:09:59 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:54.868 [print] {
"resourceType": "Observation",
"id": "17046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:59.690+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:09:54.868 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:55.449 [print] {
"resourceType": "Observation",
"id": "17046",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:09:59.690+02:00",
"source": "#BlafhaJ50aFaza8R",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:56.066 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:09:57.681 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:00.877+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:00.877+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:09:57.681 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:58.330 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:58.330 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1f1K4Aj3GQKts0zv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17047/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:58.330 [print] {
"resourceType": "Observation",
"id": "17047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:03.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:58.330 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:09:58.332 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:09:58.332 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"1f1K4Aj3GQKts0zv"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17047/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:03 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17047/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:02 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:09:58.332 [print] {
"resourceType": "Observation",
"id": "17047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:03.131+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:09:58.332 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:09:58.946 [print] {
"resourceType": "Observation",
"id": "17047",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:03.131+02:00",
"source": "#1f1K4Aj3GQKts0zv",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:09:59.532 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:00.117 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:04.351+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:04.351+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:00.133 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:00.741 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:00.741 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vkbaRhDiNt84gej7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17048/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:00.741 [print] {
"resourceType": "Observation",
"id": "17048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:05.564+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:00.741 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:00.742 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:00.742 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"vkbaRhDiNt84gej7"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17048/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:05 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17048/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:04 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:00.743 [print] {
"resourceType": "Observation",
"id": "17048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:05.564+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:00.743 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:01.320 [print] {
"resourceType": "Observation",
"id": "17048",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:05.564+02:00",
"source": "#vkbaRhDiNt84gej7",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:01.958 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:02.565 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:06.770+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:06.770+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:02.565 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:03.195 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:03.195 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dv3bfHcrcqqhpuf0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17049/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:03.195 [print] {
"resourceType": "Observation",
"id": "17049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:08.016+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:03.195 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:03.197 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:03.197 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"dv3bfHcrcqqhpuf0"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17049/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:08 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17049/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:07 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:03.197 [print] {
"resourceType": "Observation",
"id": "17049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:08.016+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:03.197 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:03.791 [print] {
"resourceType": "Observation",
"id": "17049",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:08.016+02:00",
"source": "#dv3bfHcrcqqhpuf0",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:04.445 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:05.044 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:09.261+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:09.261+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:05.045 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:05.643 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:05.643 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NH31s6uce3lRRueY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17050/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:05.643 [print] {
"resourceType": "Observation",
"id": "17050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:10.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:05.643 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:05.645 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:05.645 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"NH31s6uce3lRRueY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17050/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:10 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17050/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:09 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:05.645 [print] {
"resourceType": "Observation",
"id": "17050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:10.466+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:05.645 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:06.249 [print] {
"resourceType": "Observation",
"id": "17050",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:10.466+02:00",
"source": "#NH31s6uce3lRRueY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:06.858 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:07.457 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:11.679+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:11.679+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:07.457 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:08.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:08.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zq4ycKwAw6gyV09Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17051/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:08.073 [print] {
"resourceType": "Observation",
"id": "17051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:12.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:08.073 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:08.073 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:08.073 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"zq4ycKwAw6gyV09Z"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17051/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:12 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17051/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:12 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:08.073 [print] {
"resourceType": "Observation",
"id": "17051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:12.896+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:08.073 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:08.707 [print] {
"resourceType": "Observation",
"id": "17051",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:12.896+02:00",
"source": "#zq4ycKwAw6gyV09Z",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:09.350 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:09.956 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:14.167+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:14.167+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:09.956 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:10.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:10.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LTRHxOVTUedpzhj1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17052/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:10.604 [print] {
"resourceType": "Observation",
"id": "17052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:15.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:10.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:10.604 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:10.604 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"LTRHxOVTUedpzhj1"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17052/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:15 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17052/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:14 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:10.604 [print] {
"resourceType": "Observation",
"id": "17052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:15.426+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:10.604 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:12.201 [print] {
"resourceType": "Observation",
"id": "17052",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:15.426+02:00",
"source": "#LTRHxOVTUedpzhj1",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:13.217 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:13.830 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:18.035+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:18.035+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:13.832 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:14.466 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:14.466 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I9jczwIYvjpEHCSJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17053/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:14.466 [print] {
"resourceType": "Observation",
"id": "17053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:19.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:14.466 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:14.467 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:14.467 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"I9jczwIYvjpEHCSJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17053/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:19 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17053/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:19 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:14.467 [print] {
"resourceType": "Observation",
"id": "17053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:19.277+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:14.467 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:15.394 [print] {
"resourceType": "Observation",
"id": "17053",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:19.277+02:00",
"source": "#I9jczwIYvjpEHCSJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:16.432 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:17.341 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:21.235+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:21.235+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:17.342 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:17.928 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:17.928 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XYRCXzZu78rm6Uqd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17054/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:17.928 [print] {
"resourceType": "Observation",
"id": "17054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:22.748+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:17.928 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:17.929 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:17.929 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"XYRCXzZu78rm6Uqd"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17054/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:22 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17054/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:22 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:17.929 [print] {
"resourceType": "Observation",
"id": "17054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:22.748+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:17.929 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:18.758 [print] {
"resourceType": "Observation",
"id": "17054",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:22.748+02:00",
"source": "#XYRCXzZu78rm6Uqd",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:19.381 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:20.210 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:24.214+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:24.214+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:20.210 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:20.978 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:20.978 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZvBFKwuo5mopKWFJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17055/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:20.978 [print] {
"resourceType": "Observation",
"id": "17055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:25.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:20.978 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:20.984 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:20.984 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ZvBFKwuo5mopKWFJ"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17055/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:25 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17055/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:25 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:20.984 [print] {
"resourceType": "Observation",
"id": "17055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:25.799+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:20.984 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:21.611 [print] {
"resourceType": "Observation",
"id": "17055",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:25.799+02:00",
"source": "#ZvBFKwuo5mopKWFJ",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:22.252 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 6ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 6ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:22.861 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:27.069+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:27.069+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:22.861 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:23.472 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:23.472 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ns80xEPcBev69SeS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17056/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:23.472 [print] {
"resourceType": "Observation",
"id": "17056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:28.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:23.472 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:23.474 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:23.474 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"ns80xEPcBev69SeS"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17056/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:28 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17056/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:28 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:23.474 [print] {
"resourceType": "Observation",
"id": "17056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:28.292+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:23.474 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:24.373 [print] {
"resourceType": "Observation",
"id": "17056",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:28.292+02:00",
"source": "#ns80xEPcBev69SeS",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:25.959 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 5ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 5ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:26.798 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:30.789+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:30.789+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:26.798 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:27.412 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:27.412 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OBy7IxQzI5tsAx7L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17057/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:27.412 [print] {
"resourceType": "Observation",
"id": "17057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:32.246+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:27.412 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:27.412 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:27.412 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"OBy7IxQzI5tsAx7L"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17057/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:32 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17057/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:32 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:27.412 [print] {
"resourceType": "Observation",
"id": "17057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:32.246+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:27.412 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:27.997 [print] {
"resourceType": "Observation",
"id": "17057",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:32.246+02:00",
"source": "#OBy7IxQzI5tsAx7L",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:28.612 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:29.185 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:33.436+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:33.436+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:29.185 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:30.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:30.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"noN9T2mNBgZ3qgbY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17058/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:30.036 [print] {
"resourceType": "Observation",
"id": "17058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:34.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:30.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:30.036 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:30.036 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"noN9T2mNBgZ3qgbY"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17058/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:34 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17058/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:34 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:30.036 [print] {
"resourceType": "Observation",
"id": "17058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:34.868+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:30.036 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:30.665 [print] {
"resourceType": "Observation",
"id": "17058",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:34.868+02:00",
"source": "#noN9T2mNBgZ3qgbY",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:31.237 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:31.877 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:36.067+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:36.067+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:31.878 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:32.493 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:32.494 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KgHs6hkfmMzeGYCj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17059/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:32.494 [print] {
"resourceType": "Observation",
"id": "17059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:37.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:32.494 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:32.495 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2595"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:32.495 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"KgHs6hkfmMzeGYCj"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17059/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:37 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17059/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:37 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:32.495 [print] {
"resourceType": "Observation",
"id": "17059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:37.312+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
> *
print COOKIES
12:10:32.495 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:33.081 [print] {
"resourceType": "Observation",
"id": "17059",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:37.312+02:00",
"source": "#KgHs6hkfmMzeGYCj",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "before-procedure",
"display": "Before procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:33.674 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:34.307 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:38.496+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:38.496+02:00"
}
]
}
@Delete
@Post
@Get
@Observation
@Only-api
Scenario Outline: The hospital sends a FHIR Observation resource.
Given
path '/Observation'
And
print resource
12:10:34.308 [print] {
"resourceType": "Observation",
"meta": {
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
],
"security": [
{
"system": "http://hl7.org/fhir/ValueSet/security-labels",
"code": "SYSDEV"
}
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation \"ObservationCBloodSCT-1-1\" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> \" ZEISIG\"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 \"Blood group A\")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
method POST
Then
status 201
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:34.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:34.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4oRe4FKS6aMLt9Mw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17060/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:34.914 [print] {
"resourceType": "Observation",
"id": "17060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:39.726+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:34.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
And
call read('../../utils/features/PRINT-DATA.feature') { REQUEST_HEADERS: '#(karate.prevRequest.headers)', RESPONSE_HEADERS: #(responseHeaders), COOKIES: #(responseCookies), RESPONSE: #(response)}
karate/src/features/api/../../utils/features/PRINT-DATA.feature
> *
print REQUEST_HEADERS
12:10:34.914 [print] {
"Accept": [
"application/json"
],
"Authorization": "********",
"Content-Type": [
"application/json; charset=UTF-8"
],
"Content-Length": [
"2593"
],
"Host": [
"psp-sp-fhir.prep.sanit.cineca.it"
],
"Connection": [
"Keep-Alive"
],
"User-Agent": [
"Apache-HttpClient/4.5.13 (Java/17.0.2)"
],
"Accept-Encoding": [
"gzip,deflate"
]
}
> *
print RESPONSE_HEADERS
12:10:34.914 [print] {
"X-Powered-By": [
"HAPI FHIR 5.6.0 REST Server (FHIR Server; FHIR 4.0.1/R4)"
],
"ETag": [
"W/\"1\""
],
"X-Request-ID": [
"4oRe4FKS6aMLt9Mw"
],
"Content-Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17060/_history/1"
],
"Last-Modified": [
"Tue, 13 Sep 2022 10:10:39 GMT"
],
"Location": [
"https://psp-sp-fhir.prep.sanit.cineca.it:443/fhir/Observation/17060/_history/1"
],
"Content-Type": [
"application/fhir+json;charset=UTF-8"
],
"Transfer-Encoding": [
"chunked"
],
"Date": [
"Tue, 13 Sep 2022 10:10:39 GMT"
],
"Set-Cookie": [
"07cff3b053bba18fe69209fb3b88c92f=2e3c21d0feaae8da2bb7ca7166b2c09a; Domain=psp-sp-fhir.prep.sanit.cineca.it; Secure"
]
}
> *
print RESPONSE
12:10:34.914 [print] {
"resourceType": "Observation",
"id": "17060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:39.726+02:00",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
> *
print COOKIES
12:10:34.914 [print] {
"07cff3b053bba18fe69209fb3b88c92f": {
"path": null,
"domain": "psp-sp-fhir.prep.sanit.cineca.it",
"name": "07cff3b053bba18fe69209fb3b88c92f",
"max-age": -9223372036854775808,
"httponly": false,
"secure": true,
"value": "2e3c21d0feaae8da2bb7ca7166b2c09a",
"wrap": false
}
}
When
print 'They search on the server for the already created FHIR resource'
And
method GET
Then
status 200
And
print response
12:10:35.509 [print] {
"resourceType": "Observation",
"id": "17060",
"meta": {
"versionId": "1",
"lastUpdated": "2022-09-13T12:10:39.726+02:00",
"source": "#4oRe4FKS6aMLt9Mw",
"profile": [
"http://hl7.eu/fhir/ig/pcsp/StructureDefinition/Observation-bld-abo-rh-eu-pcsp"
]
},
"language": "ES",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Generated Narrative: Observation</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource Observation "ObservationCBloodSCT-1-1" </p><p style=\"margin-bottom: 0px\">Profile: <a href=\"StructureDefinition-Observation-bld-abo-rh-eu-pcsp.html\">Observation: Blood type/RH</a></p></div><p><b>partOf</b>: <a href=\"Procedure-ProcedureSTC-1.html\">Procedure/ProcedureSTC-1</a></p><p><b>status</b>: final</p><p><b>code</b>: ABO and Rh group panel - Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#34530-6)</span></p><p><b>subject</b>: <a href=\"Patient-PatientMainzZeisig.html\">Patient/PatientMainzZeisig</a> " ZEISIG"</p><p><b>effective</b>: Code: Before procedure</p><blockquote><p><b>component</b></p><p><b>code</b>: ABO group [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#883-9)</span></p><p><b>value</b>: Group A <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA19710-5; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#112144000 "Blood group A")</span></p></blockquote><blockquote><p><b>component</b></p><p><b>code</b>: Rh [Type] in Blood <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#10331-7)</span></p><p><b>value</b>: Positive <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"https://loinc.org/\">LOINC</a>#LA6576-8; <a href=\"https://browser.ihtsdotools.org/\">SNOMED CT</a>#10828004)</span></p></blockquote></div>"
},
"status": "final",
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "34530-6",
"display": "ABO and Rh group panel - Blood"
}
]
},
"effectiveTiming": {
"code": {
"coding": [
{
"system": "http://hl7.eu/fhir/ig/pcsp/CodeSystem/cs-generic-eu-pcsp",
"code": "after-procedure",
"display": "After procedure"
}
]
}
}
}
When
print 'They try to delete the Observation resource from the server'
And
method DELETE
Then
status 200
And
print response
12:10:36.121 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">INFORMATION</td><td>[]</td><td><pre>Successfully deleted 1 resource(s) in 4ms</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "information",
"code": "informational",
"diagnostics": "Successfully deleted 1 resource(s) in 4ms"
}
]
}
When
print 'They check if the Observation resource is on the server'
And
method GET
Then
status 410
And
print response
12:10:36.679 [print] {
"resourceType": "OperationOutcome",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">ERROR</td><td>[]</td><td><pre>Resource was deleted at 2022-09-13T12:10:40.947+02:00</pre></td>\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
},
"issue": [
{
"severity": "error",
"code": "processing",
"diagnostics": "Resource was deleted at 2022-09-13T12:10:40.947+02:00"
}
]
}